Firstly praise is in order!
You have taken the biggest step to securing your applications and becoming a great developer - you actually considered security. Seriously, that makes me feel better about the future of developers because so few in industry even make it that far. Well done :-)
Now for the fun part:
Protecting your application against cross site scripting, or indeed any other kinds of vulnerabilities, is not something that can be achieved simply by installing something or enabling something in Tomcat in fact, the fact that you are using Tomcat should not really be relevant to any application level vulnerabilities. Additionally, Cross Site Request Forgery is a separate, unrelated vulnerability. Sorry :-(
Looking at your specific example for a moment - basically the issue you have is that your application is taking any input a user puts into the login form and is printing it out in the page without sanitising it. In the report it is telling you that it tried to log in with username </span><script>alert(1);</script><span>
and found that the script and alert were printed out in the response.
You can try this yourself and you will see the problem - you will get an alert popup.
Unfortunately, there is no simple switch to flip to protect your application. You have to learn about and understand your all of the common vulnerability types and then learn the standard approaches and tools to combat each.
A great starting point is the OWASP Top 10 wiki, where you can find oodles of information about various vulnerabilities, what they are, how they work and what you should be doing to protect against them.
https://www.owasp.org/index.php/Top_10_2013-Top_10
You can even find code samples and worked examples to help.
I feel a bit like leading a lamb to slaughter here - I know that reading through all of that will be quite daunting, but take your time and don't panic. Once you understand each of the vulnerability types, you will find that most are pretty easy to prevent.
Hope this helps,
Charlie