Response already committed
843841Feb 5 2007 — edited Feb 5 2007Got 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)?