You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sam Cheung <sy...@yahoo.com> on 2002/09/10 17:46:53 UTC

How can I send respond incrementally in a Servlet

Hi,

I would like to send response back to user during the
execution of the doGet() method, not upon completion
of the excution of the doGet() method.

I try calling the flushBuffer() of the response and 
the flush() of the print writer of the response but it
does not work, could someone please tell me how I can
do it?

Thanks for your help.
Sam


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How can I send respond incrementally in a Servlet

Posted by Tim Funk <fu...@joedog.org>.
How about setting your buffer size smaller. It will force flushing more 
often.

response.setBufferSize(int size)
or
<%@ page buffer="8kb" %>



Sam Cheung wrote:
> Hi,
> 
> I would like to send response back to user during the
> execution of the doGet() method, not upon completion
> of the excution of the doGet() method.
> 
> I try calling the flushBuffer() of the response and 
> the flush() of the print writer of the response but it
> does not work, could someone please tell me how I can
> do it?
> 
> Thanks for your help.
> Sam


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How can I send respond incrementally in a Servlet

Posted by Rosdi bin Kasim <ro...@epantai.com.my>.
What is exactly the 'response' you are sending?
If it is a table, then the browser will only display it once the whole table
is completed (until it received </table>).

Regards,
Rosdi.

----- Original Message -----
From: "Sam Cheung" <sy...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, September 10, 2002 11:46 PM
Subject: How can I send respond incrementally in a Servlet


> Hi,
>
> I would like to send response back to user during the
> execution of the doGet() method, not upon completion
> of the excution of the doGet() method.
>
> I try calling the flushBuffer() of the response and
> the flush() of the print writer of the response but it
> does not work, could someone please tell me how I can
> do it?
>
> Thanks for your help.
> Sam
>
>
> __________________________________________________
> Yahoo! - We Remember
> 9-11: A tribute to the more than 3,000 lives lost
> http://dir.remember.yahoo.com/tribute
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>