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


Reply via email to