You can also manage this buffer.  in the <%@page %> directive there is
attributes called buffer and autoflush.  There is not telling when a
JSP/servlet engine will try and flush the output buffer when setting the
attribute autoflush to true. if you set to false and set the buffer="(x)kb"
it will not flush the output until the buffer(size(x)) is full.  if you make
this buffer bigger than the size of the page than it will never flush until
it has complete processed the entire page.  I do warn however that the
bigger the size of this buffer the more expensive it will be.

Zach

-----Original Message-----
From: Thomas Preston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 28, 2000 11:20 AM
To: [EMAIL PROTECTED]
Subject: Re: Strange Bug


Hi,

Jsp uses buffer.  When you start to send html back to client from server
side, it doesn't just start sending it immediately.  Instead it buffers the
output.  WHen the buffer is full, the buffer has to be flushed back to the
client.  When this happens, the http head is sent along with the buffered
body.  At this point the buffer is said to be committed (see any servlet
book on this issue or servlet spec).  Once the buffer has been committed,
the head has been sent back to the client, so any transaction that needs to
modify the head (like sendRedirect) will fail.  In WL implementation of jsp,
if you keepgenerated and view the .java file that is generated by the
server, you will see a try block around the re-direction operation that
occurs when page wants to go to an error page.  If re-direction is not
possible because the head has been committed, you will get some type of
error (like possibly illegalStateException) on the server console and the
page will not be forwarded to the error page.

>From: jonny doe <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Strange Bug
>Date: Wed, 28 Jun 2000 07:41:30 -0700
>
>Hey Thomas,
>
>What do you mean by the buffer being 'committed'? I
>came across this error to.
>
>--- Thomas Preston <[EMAIL PROTECTED]> wrote:
> > Are you redirecting to an errorpage on error?  If
> > so, redirecting to error
> > page can't be done if the buffer has been
> > "committed".  If this is the
> > problem, then you are getting an exception on the
> > page somewhere...
> >
> >
> > >From: "Sachin S. Khanna" <[EMAIL PROTECTED]>
> > >Reply-To: A mailing list about Java Server Pages
> > specification and
> > >     reference <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: Strange Bug
> > >Date: Wed, 28 Jun 2000 16:01:15 +0530
> > >
> > >I have a simple jsp which uses a bean to send an
> > email. The code is working
> > >fine on one server but throwing the following error
> > on the other:
> > >java.lang.IllegalStateException: Response has
> > already been committed
> > >What could be the reason for this kind of strange
> > behaviour.
> > >Have a nice day.
> > >With regards,
> > >Sachin S. Khanna.
> > >www.emailanorder.com
> > >
> >
>
>===========================================================================
> > >To unsubscribe: mailto [EMAIL PROTECTED] with
> > body: "signoff
> > >JSP-INTEREST".
> > >Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >
> >
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
>________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
> > http://www.hotmail.com
> >
> >
>===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with
> > body: "signoff JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
>__________________________________________________
>Do You Yahoo!?
>Get Yahoo! Mail - Free email you can access from anywhere!
>http://mail.yahoo.com/
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


**********************************************************************

This email and any files transmitted with it are confidential
 and intended solely for the use of the individual or entity to
 whom they are addressed.  If you have received this email
 in error, please notify the sender by email and delete and
 destroy this message and its attachments.

**********************************************************************

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to