You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Surendra Kashyap <sk...@comcast.net> on 2003/08/04 05:45:34 UTC

Even after flushing the buffer BODY content does not get sent immediately to the client

I am my servlet deployed in tomcat 4.18 (Solaris JRE 1.3.1). I have a situation ( due to large payload) where I need to buffer the raw data and send HTTP response and process the message later.

I set the HTTP status(200), content length and write BODY ( very small)  and call flushBuffer().... The HTTP status code ( header) is sent to the client immediatelly when I call flushBuffer(), however, the BODY is not sent immediately ( as I was expecting).

I even used setBufferSize() method to reduce the buffer size but don't see the expected result. It seems, like tomcat buffers the BODY content and does not flush it until POST method is finished executing.

Is there anyway, I can tell tomcat to send the BODY as soon as I call flushBuffer() and not wait until POST method is complete.

Any help would be appreciated.

Thanks!

Surendra







--------------------------------------------------------
Surendra K Kashyap
Nashville, TN
skashyap@comcast.net (Home)
------------------------------------------------------