tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Görling <>
Subject Stealing the Writer (Was: Re: Configuring a Default Servlet)
Date Mon, 09 Feb 2004 14:46:15 GMT
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 -->")
    out.println("<!-- This is the end of the request, it took foo 


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)?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message