To prevent stored XSS, I have written a filter which will wrap HttpServletRequest into custom wrapper. The wrapper is as follows:
HttpServletRequest
public class My