tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Soutter" <>
Subject [T4] servlet including jsp causes jsp to flush buffer?
Date Wed, 13 Jun 2001 06:14:39 GMT

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).


public void release() {
  try {
    if (isIncluded) {
      ((JspWriterImpl)out).flushBuffer(); // push it into the including
    } else {
  } catch (IOException ex) {
    loghelper.log("Internal error flushing the buffer in release()");

and in

public void flush()  throws IOException {
  synchronized (lock) {
    if (out != null) {
      // Also flush the response buffer.


Keep cool till after school!

View raw message