On Wed, Jul 3, 2013 at 10:02 AM, Sven Meier <[email protected]> wrote: > HttpServletResponse has no data to push until the very end of the >> request cycle. >> > > That's not quite right: > As soon as WebPageRenderer writes the buffered page into the real > response, Tomcat has something to flush. If it does flush (for whatever > reason), any additional header set
Can you paste the code that does this in WebPageRenderer ? AFAIK org.apache.wicket.protocol.http.servlet.ServletWebResponse#flush() makes the transfer from the BufferedWebResponse to HttpServletResponse. > in #onEndRequest() might be ignored. > > Sven > > > > On 07/03/2013 03:52 AM, Martin Grigorov wrote: > >> Hi, >> >> org.apache.wicket.markup.html.**WebPage#configureResponse() is a good >> place >> for this. >> >> Wicket buffers the response so Tomcat cannot flush it no matter the size. >> I.e. the HttpServletResponse has no data to push until the very end of the >> request cycle. >> >> >> On Tue, Jul 2, 2013 at 5:07 PM, Martin Funk <[email protected]> wrote: >> >> Hi there, >>> >>> what is the best place to set http response state? >>> >>> I was trying the 'onSomething' callback methods in IRequestCycleListener >>> Like onEndRequest >>> >>> But sometimes those get ignored >>> >>> The last save place I figured was onAfterRender in the page class, but >>> this >>> doesn't feel right. >>> >>> The reason that calls like: >>> ((HttpServletResponse) >>> RequestCycle.get().**getResponse().**getContainerResponse()).** >>> setStatus(404); >>> in the RequestCycle Listner are ignored seems to be that the underlying >>> container, Tomcat 6.0.37 in our case, starts to flush the outputstream as >>> the Response becomes big, as in maybe 20k. >>> >>> If the response is small enoug the status, can be set in the 'onDetach()' >>> >>> Anyone any ideas? >>> >>> Martin >>> >>> > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > >
