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 get from the
response, write to a StringWriter, and at the end of your servlet
processing write the contents of this StringWriter both to a log and to
the response's output writer.
Yoav Shapira
Millennium Research Informatics
-----Original Message-----
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 11:08 AM
To: Tomcat Users List
Subject: How to view what is sent to the browser
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail, including any attachments, is a confidential business communication, and
may contain information that is confidential, proprietary and/or privileged. This
e-mail is intended only for the individual(s) to whom it is addressed, and may not be
saved, copied, printed, disclosed or used by anyone else. If you are not the(an)
intended recipient, please immediately delete this e-mail from your computer system
and notify the sender. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]