tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: How the Tomcat do flush?
Date Thu, 10 May 2001 16:41:55 GMT


On Thu, 10 May 2001, Harden ZHU wrote:

> I am trying to do customize of tomcat for my application.
> So to make Tomcat can just flush once at the end. What program should I
> change?
> 

Without knowing specifically what version of Tomcat you are asking about,
or what flushes occur that you do not want, it's difficult to give you any
specific answers.  However, a couple of general notes apply:

* Flushes occur when the application asks for it (response.flushBuffer()).

* Flushes occur when you write more bytes than the size of the buffer.
  You can set this (for servlets) with response.setBufferSize() or
  (for JSP pages) with a <%@ page buffer="8kb" %> directive.

* Flushes occur when a JSP page says <jsp:include flush="true">, which is
  the only legal setting for JSP 1.1.

* In Tomcat 3.2.1, at least (don't know if it changed in 3.2.2) Tomcat
  does a flush when a servlet does RequestDispatcher.include().  This is
  not really correct behavior, but it was required to work around some
  much more serious issues with included servlets.

* Normally, you should prefer making your applications behave the way you
  want through the standard servlet APIs, rather than modifying the
  container itself -- that way, you will be portable to other servers
  as well.

> Thanks
> 
> Harden
> 
> 

Craig



Mime
View raw message