I am looking for a way to view what is being sent to the browser in the
servlet.
Lets say I want to create a bad word filter(and cannot use an actual filter)
once I get the response, is there a way to manipulate it before it is sent
to the browser?
Thanks,
James
Hi,
You can do this easily with an HttpServletResponseWrapper and a Filter.
But if you can modify the servlet, you can do this in a very easy (but
somewhat crude way): instead of writing to the Writer you get from the
response, write to a StringWriter, and at the end of your servlet
processing
well you could get the request object and search all the parameters
sent by the client to filter them
James Sherwood escribió:
I am looking for a way to view what is being sent to the browser in the
servlet.
Lets say I want to create a bad word filter(and cannot use an actual filter)
you could also use pageContext.pushBody(new BadWordsFilterWriter())
Shapira, Yoav escribió:
Hi,
You can do this easily with an HttpServletResponseWrapper and a Filter.
But if you can modify the servlet, you can do this in a very easy (but
somewhat crude way): instead of writing to the Writer you