| From | Sent On | Attachments |
|---|---|---|
| Aditya | Mar 20, 2003 9:39 pm | |
| Aditya | Mar 21, 2003 2:50 pm | |
| Craig R. McClanahan | Mar 24, 2003 11:43 am | |
| Aditya | Mar 24, 2003 1:34 pm | |
| Craig R. McClanahan | Mar 24, 2003 2:10 pm | |
| Aditya | Mar 24, 2003 5:07 pm | |
| Craig R. McClanahan | Mar 24, 2003 9:31 pm | |
| Aditya | Mar 24, 2003 10:55 pm |
| Subject: | Re: Filter access to response object [was Re: domain-wide session cookies?] | |
|---|---|---|
| From: | Aditya (adi...@grot.org) | |
| Date: | Mar 24, 2003 10:55:42 pm | |
| List: | org.apache.tomcat.dev | |
On Mon, 24 Mar 2003 21:32:07 -0800 (PST), "Craig R. McClanahan"
<crai...@apache.org> said:
On Mon, 24 Mar 2003, Aditya wrote: Here's my problem: - I have a single filter that essentially does:
doFilter(...) do stuff to request object... chain.doFilter(..); do stuff to response object... }
however, it seems that Tomcat adds response headers _after_ the filter, is there a reason for that? I'd like to manipulate *ALL* the headers in the response object with my filter...
Since Tomcat adds its last headers when the response is committed (because otherwise they would not be able to be added), why not just add a call to:
response.flushBuffer();
before the line that says:
"do stuff to response object..."
Maybe I wasn't clear -- I'd like to manipulate all the response headers at the point I say "do stuff to response object..." and if I call response.flushBuffer() right before that, I no longer can manipulate the headers in the response object (empirically verified under Tomcat 4.1.20). I must be missing something.
Adi





