Cannot forward a response that is already committed

java.lang.IllegalStateException: Cannot forward a response that is already committed

at weblogic.servlet.internal.RequestDispatcherImpl.forward(
at org.apache.struts.action.RequestProcessor.doForward(
at org.apache.struts.action.RequestProcessor.processActionForward(
at org.apache.struts.action.RequestProcessor.process(
at org.apache.struts.action.ActionServlet.process(
at org.apache.struts.action.ActionServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(
at weblogic.servlet.internal.RequestDispatcherImpl.include(
at weblogic.servlet.jsp.PageContextImpl.include(
at weblogic.servlet.jsp.PageContextImpl.handlePageException(
at weblogic.servlet.jsp.JspBase.service(
####<Oct 20, 2009 2:18:04 AM EDT> <Critical> <Health> <weblogic.GCMonitor> <<anonymous>> <> <> <1287555484427> <BEA-310003> <Free memory in the server is 9,979,338 bytes. There is danger of OutOfMemoryError>


The java.lang.IllegalStateException: Cannot forward a response that is already committed is referenced as follows:

When a servlet is first called, the response object is fresh and new: its headers have not been set, its buffers are empty, and no data has been written to the client.
However, as soon as either the status code or any of the headers have been written — or potentially written — to the client, or when data has been — or may have been — written to the body stream, then you may be susceptible to the IllegalStateException error.
The problem that this exception is signalling is the new data writing is inconsistent with the data that is already been set and then irretrievably sent (“committed”) to the client.

Therefore, the application code has to be reviewed in order to avoid those exceptions and check that those could be the cause of the warning’s about “Out of Memory“.

It is recommended to follow the coding practices suggested in the following documents to avoid memory leaks in your application.




In case of any ┬ęCopyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.