tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wentzel <Michael.Went...@aswethink.com>
Subject RE: IllegalStateException - tomcat 4
Date Thu, 15 Feb 2001 18:49:01 GMT
> > I have searched archives and have seen similar discussions, 
> but could not
> > really find an answer.
> > I am developing a software on top of Servlet API 2.3 so I 
> do need to use
> > Tomcat at least for now. I tried to create a very 
> simplified test case. I
> > was able to reproduce a part of the problem so far, so that 
> I can move
> > forward.
> > I am getting the following exception:
> >
> > java.lang.IllegalStateException: Cannot forward after 
> response has been
> > committed
> > 	at
> > org.apache.catalina.core.ApplicationDispatcher.doForward(Applicati
> > onDispatch
> > er.java:245)
> > 	at
> > org.apache.catalina.core.ApplicationDispatcher.forward(Application
> > Dispatcher
> > .java:236)
> > 	at
> > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerSe
> > rvlet.java
> > :386)
> > 	at
> > 
> org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServl
> et.java:144)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 	at
> > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationD
> > ispatcher.
> > java:573)
> > 	at
> > org.apache.catalina.core.ApplicationDispatcher.doInclude(Applicati
> > onDispatch
> > er.java:483)
> > ...

This is the stack level that seems to initiate the problem.  The call to
ApplicationDispatcher.doInclude ends up calling the
InvokerServlet.serveRequest.
If you take a look at the serveRequest method source it passes the request
to RequestDispatcher.forward and here in lies the problem and the source of
the call to doForward(this doesn't seem right to me).

> I read the spec - it says that there are limitations with "forward", but
> "include" should be just fine.

Is this the Catalina specs specifically or Servlet specs(if so which version
of servlet specs)?

If you're interested here's the path to the relevant classes:

TOMCAT_HOME/src/catalina/src/share/org/apache/catalina/servlets/InvokerServl
et.java
TOMCAT_HOME/src/catalina/src/share/org/apache/catalina/core/ApplicationDispa
tcher.java


Sorry this doesn't give you much help in fixing your problem but maybe at
least it
will be a starting point.

---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:wentzel@aswethink.com

- Punisher of those who cannot spell dumb!

Mime
View raw message