Sumved Shami

Greenhorn
+ Follow
since Aug 18, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sumved Shami

Thanks for your reply again.

But, precisely which method needs to be over-written?

Thanks & Regards,
Sumved Shami
11 years ago
Thanks for such a quick reply Sebastian.

So, you mean, I need to extend HttpServletResponseWrapper class?
Even if I extend a class, where I can get this response content? Precisely, where and how I will capture the content?

Thanks for your patience.



11 years ago
Hi All

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.

Thanks for showing your interest in this post.

Regards,
Sumved Shami
11 years ago