Howdy,
Why pollute the response with data about its performance? I think that data is better
placed in a log file (and then you filter approach will work fine). For example,
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html.
But if you really want to put it in the response itself, I'm not sure why you're not
seeing your output, unless somewhere down the chain an error occurs or something
closes the output stream.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Stefan Görling [mailto:[EMAIL PROTECTED]
Sent: Monday, February 09, 2004 9:46 AM
To: Tomcat Users List
Subject: Stealing the Writer (Was: Re: Configuring a Default Servlet)
Dear Tim,
Thanks!, Filters works great to solve this problem. Here's another
stupid thing I want to do. I want to measure the performance, by
wrapping every request buy another filter (or similiar):
public void doFilter(ServletRequest request, ServletResponse, response,
FilterChain chain) throws IOException, ServletException {
ServletOutputStream out=response.getOutputStream();
out.println(!-- request started --)
chain.doFilter(request,response);
out.println(!-- This is the end of the request, it took foo
seconds--);
}
The page is delivered properly, but the debug output is not returned. If
i remove chain.doFitlter, the text is printed properly. Anyone who has
an idea on how to Steal a working writer to add some debug data at the
end (start is not really necessary)?
/Stefan
-
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]