Costin Manolache wrote:
No, that wouldn't work.I'm getting closer - Remy or Kin-Man, I need your help. As I expected, the flush() was hiding some other behaviors.Right now I'm looking at ApplicationDispatcher.doForward(). What happens is: - error happens - we forward to the error page - error page executes, put the data in the out buffer - BEFORE: the out buffer was commited - now we just return from servlet to doForward() - The "commiting and closing response" reached ( line 471 ) What happens here is response is a ResponseFacade, and finish is called. But the real flushing and closing doesn't actually happens. I changed the code to first flush/close, the call finish - and it now seems to work fine. But I'm not sure what else may be affected by this - or if it's safe to make the change ( well, for 5.0 it may be, but what about 4.1 ? ) In any case, I expect this to have caused some weird behavior for normal forward - since forward doesn't seem to really flush/close as it was supposed to do ( unless response is not facade - does this case ever happen ? ). A bit strange no other test detected that, normal servlets don't have flush/close that the jsp page had.
forward does a fake flush/close, because some further error page processing may occur (based on the status code, for example).
I think we'll have to do the commit in the JSP error page itself (and call close right away in the case, rather than flush). I hope it's doable.
Remy
--
To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>