tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmanola...@yahoo.com
Subject Re: TC3.2.1 - response commit on included JSPs
Date Sat, 24 Feb 2001 00:50:59 GMT
> I won't contest that, but I would suggest considering
> the idea that the final, or intended destination is
> not necessarily the browser.  In the case of an
> included resource, it is the calling servlet that is
> acting as client to the included resource.  In good OO
> design, it should be in the control of that client
> what to do with the data that has been 'committed' by
> the included resource.

Except that this is explicitely specified - the flush()
in JspWriter should be propagated to the next stream.

" if that destination is another character or
 byte stream, flush it."

In this case, the destination is the servlet output
stream - and it has to be flushed.

And it is also explicitely stated that the included
servlet can commit the response ( in RequestDispatcher 
spec )

> Looking at the Tomcat 3.2.1 code, I see that this
> situation is still further broken in this regard
> because inside inside the

We had a lot of problems with buffering - and changing 
3.2.1 may be very dangerous ( because of many 
inter-dependecies like session,etc).

The main change in 3.3 is removing many of the 
dependencies and cleaning the code. M

> I realize also, from looking around in the CVS
> repositories that the 'facade' package is history so I
> am not familiar yet with how newer versions of tomcat
> implement the include() method.  Have they removed
> this offending call?

Yes, and the whole buffering has been reimplemented.
BTW, both solution should work with the current code -
you can make the OutputBuffer ( the main component
in the new buffer implementation ) ignore the flush(),
etc.

( in 3.3 the Buffer is the central element - instead of
hiding it inside the Stream it is now a first-class 
internal object, that can be controled via API )


> It becomes clearer and clearer to me that I'm going to have to swallow
> upgrading to a newer version of Tomcat than 3.2.1.  Which version
> should I jump in on?  Sigh...

I would say 3.3 :-)

We hope to have a beta in few weeks - the code is already
usable and stable.

Costin


Mime
View raw message