How to view what is sent to the browser

2004-08-31 Thread James Sherwood
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

RE: How to view what is sent to the browser

2004-08-31 Thread Shapira, Yoav
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

Re: How to view what is sent to the browser

2004-08-31 Thread John Villar
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)

Re: How to view what is sent to the browser

2004-08-31 Thread John Villar
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