tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Görling <stefan.gorl...@pricerunner.com>
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 -->")
    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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message