I want to handle exceptions from XSSRequestWrapper.
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
chain.doFilter(new XSSRequestWrapper((HttpServletRequest) request), response);}
And class XSSEncoderRequestWrapper extends HttpServletRequestWrapper. In XSSRequestWrapper class, I want to validate the email and name fields. If they are not valid then want to throw some customer exception. Like email is not valid.