costin 2002/10/24 12:18:55 Modified: jasper2/src/share/org/apache/jasper/runtime PageContextImpl.java Log: Change the 'flush' to just a 'flushBuffer'. This allows the container to deal with flushing the buffer ( wich is done automatically if the servlet doesn't explicitely flush()/close() ). The container can attach the Content-Length header which is usefull in many cases. Revision Changes Path 1.27 +11 -6 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java Index: PageContextImpl.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- PageContextImpl.java 4 Oct 2002 19:21:44 -0000 1.26 +++ PageContextImpl.java 24 Oct 2002 19:18:55 -0000 1.27 @@ -162,7 +162,7 @@ this.bufferSize = bufferSize; this.autoFlush = autoFlush; this.request = request; - this.response = response; + this.response = response; // setup session (if required) if (request instanceof HttpServletRequest && needsSession) @@ -209,7 +209,12 @@ ((JspWriterImpl)out).flushBuffer(); // push it into the including jspWriter } else { - out.flush(); + // Old code: + //out.flush(); + // Do not flush the buffer even if we're not included (i.e. + // we are the main page. The servlet will flush it and close + // the stream. + ((JspWriterImpl)out).flushBuffer(); } } catch (IOException ex) { loghelper.log("Internal error flushing the buffer in release()"); @@ -226,7 +231,7 @@ depth = -1; baseOut.recycle(); session = null; - + attributes.clear(); }
-- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>