> From: Tim Watts [mailto:t...@cliftonfarm.org] > Subject: Re: filter question
> Doing this in a Filter, while intuitively sensible, will always be a > highly fragile solution. You would have to set a buffer large enough to > accommodate the largest conceivable response size. Once a response is > committed you can't set the response code or headers -- they're already > on their way to the client. There's no getting around this. The filter could wrap the original response object with its own creation, and thereby control what gets written through it. The wrapper object can determine when to add the header, based on whatever criteria you like, such as amount of data so far written, internal state of the webapp, etc. Examples of such wrappering have been posted on this list a few times in the recent past. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org