Advertisement
Guest User

Untitled

a guest
May 24th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @Override
  2. public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
  3. ServletException {
  4.  
  5. try {
  6. chain.doFilter(new XSSRequestWrapper((HttpServletRequest) request), response);
  7. } catch (XssAttackException e) {
  8. request.getRequestDispatcher("/XssAttack").forward(request, response);
  9. }
  10. }
  11.  
  12. public class XssAttackException extends RuntimeException {
  13.  
  14. private static final long serialVersionUID = 1L;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement