I am using Struts 1.1b1 with WAS 4.02.
In one of my action I am forwarding to another action which in turn forwards
to the final JSP.
I always get the error pasted below. This does not cause any harm, other
then cluttering up the log file.
I have read that the workaround is to use redirect instead of forward for
the intermediary action.
But I would prefer to use forward and also avoid this error message.
I don't get any errors when running on WSAD 4.02 's WTE, its only when I am
running on WAS 4.02
I would appreciate any help.
Thanks,
Sanjay
-------------------------------- Error message ------------------
[7/8/02 17:04:04:906 EDT] 3ce2be0b WebGroup X Servlet Error: ERROR:
Cannot forward. Response already committed.:
java.lang.IllegalStateException: ERROR: Cannot forward. Response already
committed.
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:92)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:97
2)
at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
sor.java:408)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:523)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:282)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:112)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
at
com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
eInvocationContext.java:106)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:125)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
- you can download servlet 2.2 specification from http://java.sun.com,
was4.0 is j2ee 1.2 certified, so it has to do as specification and your
source code should also do as it."
I am not completed understandable with their answer.
I am using WAS version 4.0.1,they also recommand me upgrade to version
4.0.3,
I am not aware whether this is helpful with the problem.
Anyone will help? GREAT appreciated!
Tommy
"Sanjay" <sg...@opers.org> wrote in message
news:agerjb$1kn2$1...@news.boulder.ibm.com...
However, if you've already written stuff back to the browser, then
there's no way for the browser to correctly interpret something in the
header, because it's already read the header.
Thus, trying to redirect (or add any HTTP header) to the response after
some of the response has already gone to the browser, is not allowed by
the spec.
Ken