I have written a filter on top of a Servlet. After doFilter() method, I want to get the content from the response object and save it inside cache. The content in the response is set by PrintWriter.println(xmlContent).
Here is the code snippet:
Please look at this line in the code snippet:
String xmlContent = response.getContent();
Right now, getContent() method is not available in HttpServletResponseWrapper class. But, I want a work around for this.