Jersey 1.x and 2.x Cross-Site Scripting XSS Filter for Java Web Apps

This post is going to show you how to build a Jersey Cross-Site Scripting XSS filter for Java Web Apps. As we all know, when building a web application of any sort it’s always important to focus on security. Cross-Site Scripting (XSS) is a popular security issue found across many sites. Here is a brief summary on the current XSS situation and a good Cheat Sheet provided by OWASP.