Re: setHeader after DoFilter delegation in filter?

2008-10-16 Thread slioch
t you need >> to see in order to determine which header to add. >> If it is just the first few bytes, then I suppose you could buffer this >> in memory until you have enough, send out your header, and then set a >> flag so that subsequent servlet writes happen as transparently as >

RE: setHeader after DoFilter delegation in filter?

2008-10-10 Thread slioch
Sorry all--I'm still stumped. Tried the suggestions and here's what I found. I've subclass HttpServletResponseWrapper and overloaded the following methods: public void flushBuffer(); public void sendRedirect(String str); public void sendError(int sc); public void sendError(int s

Re: setHeader after DoFilter delegation in filter?

2008-10-10 Thread slioch
ilter() call to the other filters). Mike Pid-2 wrote: > > André Warnier wrote: >> slioch wrote: >> [...] >> I'll risk an explanation here.. >> >> I think maybe the issue is a misunderstanding of how a servlet filter >> works. It took me a while too,

Re: setHeader after DoFilter delegation in filter?

2008-10-09 Thread slioch
Thanks for the response Christopher. Unfortunately I need to set a value in the header after the doFilter() delegation. The reason is that header valuedepends on the result of the page rendering. So, if autoflush is disabled and the buffer size is not exceeded for the page shouldn't a setHeader