Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 44344 invoked by uid 500); 14 Jun 2001 03:14:00 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 44327 invoked from network); 14 Jun 2001 03:13:57 -0000 Message-ID: <048c01c0f47f$cf958340$1e3a0e0a@kcs.com.au> From: "Geoff Soutter" To: Subject: [repost] [T4] servlet including jsp causes jsp to flush buffer? Date: Thu, 14 Jun 2001 13:12:14 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N come on guys, I know you're listening ... :-) is this really a bug or am I missing something obvious? (I'm not really up to speed on Jasper...) If it is I can enter it into bugzilla... geoff ----- Original Message ----- From: "Geoff Soutter" To: Sent: Wednesday, June 13, 2001 4:14 PM Subject: [T4] servlet including jsp causes jsp to flush buffer? > Hi, > > I've got a servlet which includes a JSP page, and it appears that the JSP > engine in Tomcat 4.0 calls response.flushBuffer() when the include finishes. > > IMHO this behaviour is incorrect, as it should be up to the "topmost" > servlet to control what is happening with the buffering as much as possible. > Currently this behaviour is preventing my servlet from controlling the > buffering as it would like to. > > I looked though the list and noticed that v3.x has many flushing problems > but I was kinda hoping they'd be fixed in Tomcat 4.x ;-). > > Anyway, here's the offending code (I think). > > In PageContextImpl.java > > public void release() { > try { > if (isIncluded) { > ((JspWriterImpl)out).flushBuffer(); // push it into the including > jspWriter > } else { > out.flush(); > } > } catch (IOException ex) { > loghelper.log("Internal error flushing the buffer in release()"); > } > > and in JspWriterImpl.java > > public void flush() throws IOException { > synchronized (lock) { > flushBuffer(); > if (out != null) { > out.flush(); > // Also flush the response buffer. > response.flushBuffer(); > } > } > } > > Geoff > > -- > Keep cool till after school! > >