tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject jasper questions
Date Thu, 24 Oct 2002 06:40:04 GMT
I'm trying to understand the last part of the JSP execution - and 
how the buffer is flushed and closed.

Acording to javadocs, JspFactory.releasePageContext() should
be invoked, and that will call PageContext.release().

In release() javadoc: 

    * This method shall "reset" the internal state of a PageContext, 
     * all internal references, and preparing the PageContext for potential
     * reuse by a later invocation of initialize(). This method is typically
     * called from JspFactory.releasePageContext().

There is no mention that this method will flush the buffers as 
side effect. At least that's my reading.

I think a more correct implementation would be to call 
out.flush()/out.close() explicitely and then call release().

The benefit would be that the connector will be able to 
automatically add Content-Length ( at least for small pages ), 
and that's usually good for performance or when talking with
certain clients. ( that's what coyote does for servlets - but
not for JSPs since flush() is called too early ).


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message