You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frederic Kam-Thong <Fr...@invera.com> on 2002/08/06 19:55:15 UTC

Tomcat 4.0.3 - Jasper - | Servlet | forward JSP cha in problem

Hi,

I'm testing a simple webapp in Tomcat 4.03 and have the following scenario:

 1) /test/main extends HttpServlet
    - forwards to /test/main.jsp using the RequestDispatcher in doGet()

 2) /test/main.jsp
       <jsp:include page="/test/details_servlet">

 3) /test/details_servlet extends HttpServlet
     - forwards to "/test/jsp_details.jsp" using the RequestDispatcher in
doGet()

NB: I'm using different names for the servlet URI and jsp page name on
purpose...

Is this legal in the first place? It's not clear from the docs/specs.

This type of interaction runs fine on a WebLogic 6.1 server but generates
the following exception with Tomcat:

java.io.FileNotFoundException: /test/details_servlet
	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:516)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:188)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:431)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:355)


Note that the file path/name in the exception's message is the servlet's
path
and not the JSP file's URI.

I've tried to debug this and everything seems fine until
javax.servlet.http.HttpServlet.service(...) is invoked.


Any insights or clarifications that you might have would be greatly
appreciated.

Thanks!


  Frederic Kam-Thong

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>