Originally posted by D Rog:
Startin writing is not equal committed. You should know that. Actually committed means that response content length is sent out and client will expect to read no longer than that. When you use chunked transfer encoding, a client can accept additional headers after last chunk of content and send redirect headers can be there.
Hi, D Rog.
Would you mind sharing your source for that?
I wasn't aware that you could start writing the body of a response without first setting the headers and response code.
From reading
isCommitted in the API
isCommitted
public boolean isCommitted()
Returns a boolean indicating if the response has been committed. A committed response has already had its status code and headers written.
And, from section SRV.5.1 in the
servlet spec (2.4):
The isCommitted method returns a boolean value indicating whether any response bytes have been returned to the client.
Is there another document that I'm missing?
Maybe you were thinking about a buffered response which allows you to start writing to the printWriter and then clear it to send a responseRedirect?
I did mention that in my first post but only in passing as not to confuse the issue.
(there is a slight exception if the output is buffered but ignore that for now)
-Ben
[ March 01, 2008: Message edited by: Ben Souther ]