tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harden ZHU" <hard...@sympatico.ca>
Subject Re: How the Tomcat do flush?
Date Fri, 11 May 2001 05:10:20 GMT
Thanks Craig. The resason that i need change flush of tomcat.
I think tomcat flush the page many times when serve JSP.
In the JSP, i need do some process before html final flushed.
If the process throw excpetion or some condition not match, i need do
forward to another page.
But Tomcat don't allow i do that. Throw exception as the writer was used or
content already flushed.

Weblogic can work fine for that situation.

Harden

----- Original Message -----
From: "Craig R. McClanahan" <craigmcc@apache.org>
To: <tomcat-dev@jakarta.apache.org>
Sent: Thursday, May 10, 2001 12:41 PM
Subject: Re: How the Tomcat do flush?


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