Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Response already committed

843841Feb 5 2007 — edited Feb 5 2007
Got to know from the API that once a response is committed, no further action can be taken with the response. I had overriden the service method in a servlet and wrote to the output stream some string using out.println and the flushed using out.flush. After this i tried to forward or redirect but an IllegalStateException was thrown. Which siad that the response was already committed. Similarly once I forwarded the request I could not write to the output stream or redirect to some JSP.
I would like to know what does it mean by saying that the response has already been committed. If it is already committed why can't we take further actions (like forwarding, redirecting or writing to the output stream after the request has been forwared or redirected etc)?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2007
Added on Feb 5 2007
1 comment
619 views