tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Please Look - 3.2 beta 7 problem - RequestDispatcher include()
Date Thu, 16 Nov 2000 03:11:15 GMT
Wyn Easton wrote:

> Are you not suppose to mix URL access with a RequestDispatcher?
> Thanks.
> Also, in 3.2 beta 6 I could do an include() then a forward().
> Now in 3.2 beta 7 I get an illegalState error on the forward()
> because of an open outputstream.  I'm not opening an output stream.
> The include() must be doing it.

This assumption is pretty close to being correct.

There was an absolutely horrible bug in 3.2 that caused all sorts of
problems with included servlets and JSP pages.  The "quick and dirty"
workaround was to have Tomcat 3.2b7 commit the response before processing
an include -- which is what causes the forward to fail now (since you
cannot do a forward after the response is committed).

Fixing this the right way this would require some fundamental changes to
3.2's architecture, which are unlikely given how late 3.2 already is.  As a
workaround, I would suggest that you change your application logic to
decide if you're going to do a forward *before* you actually do the
include.  (The include is wasted anyway, since any output it produces would
be thrown away.)

Craig McClanahan

View raw message