Hello,

I'm debugging a tomcat filter. The filter has been designed as follows:

MyFilter::DoFilter(ServletRequest request, ServletResponse response, FilterChain chain)
{
   do_some_stuff();

   //now delegate the call the chain
   chain.DoFilter();

   //the header value below doesn't always show up at the client
   response.setHeader("post-filter","true");
}


For the jsp page being accessed I've turned off AutoFlush (via a server side directive). However, I'm still seeing this page (if it exceeds a certain size but well below the jspwriter buffer size) will be sent back to the client before the response header has been modified.

All the examples I found place the delegation of the chain.DoFilter() call placed at the very end of the filter.

If AutoFlush is turned off for the jsp page and the page doesn't exceed the buffer size can it still send the response back to the client before the filter chain has completed (and in this example before the header has been modified)? Is it a bad idea to modify the response header after the call to chain.DoFilter()?

The version of tomcat is v5.5.23, and no exceptions are thrown when the setHeader call is made.

TIA

Mike

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to