users@glassfish.java.net

Re: flushBuffer doesn't work in v.2

From: <glassfish_at_javadesktop.org>
Date: Wed, 05 Dec 2007 17:37:38 PST

Thanks for the tip - it actually works as expected now. I, however, still don't understand why this is required. I know that JSP's are buffered by default but why flushing is contingent upon the buffer size? From the ServletResponse javadoc:

void flushBuffer()
                 throws IOException

    Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.

It looks to me that no matter what the buffer size is, 0kb or 100kb, the flushBuffer() should do its job. Is this incorrect interpretation of the specification/documentation? For what it's worth, Weblogic always behaved correctly in this regard, no matter what the size of the buffer is.
[Message sent by forum member 'vladchuk' (vladchuk)]

http://forums.java.net/jive/thread.jspa?messageID=248753