Hi Friends,
I am trying developa response filter, the requirement is as follows.
1.) The Filter should get the request and response object and should send a wrapped Response object to the filter.
2.) The wrapped response object should not write any thing to the browser, all the response. write, println should be captured in a stringbuffer
3.) Once the
servlet returns, I should be able to check the StringBuffer response and if I get a undesired response then I will set the status as 500 and return to browser else I would send a content of
string Buffer and send the same back to browser.
Please note: - As my application is running on another application ( Something like CMS) I wouldn't be able to access any of the
J2EE implicit objects in any of the servlets, The only solution is to design the above response filter.
I have designed the response filter, can any one guide on how to design the Response wrapper
[ December 11, 2007: Message edited by: Bear Bibeault ]