OK, oops, the path should have been relative to the webapp. But now I'm seeing a different set of problems.
My original call is to a servlet /myapp/myservlet/param1/param2. That servlet forwards to a jsp /myapp/wrapper.jsp. The jsp then includes the same servlet that called it, but changes the path, e.g., <jsp:include page="/myapp/myservlet/newparam1/newparam2" flush="true"/> When I set a breakpoint, in the servlet, it seems as if the request object is the same request object as the one from the original servlet. Specifically, the URI doesn't reflect the changes that were made in the jsp. It's spooky... Dave -----Original Message----- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 3:37 PM To: Tomcat Users List Subject: Re: jsp:include semantics? On Wed, 5 Feb 2003, David Keyes wrote: > Date: Wed, 5 Feb 2003 12:59:41 -0500 > From: David Keyes <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: FW: jsp:include semantics? > > Hello. > > What are the semantics of <jsp:include> in Tomcat 4.0.x? It seems to me > that if I jsp:include another jsp, things work fine. But if I try to > include a servlet (one that was registered in my web.xml, e.g. url == > "/mywebapp/myservlet") the servlet is treated as if it were a > traditional resource (that is, Tomcat tries to find a file named > "/mywebapp/myservlet"), which of course can't be found since it doesn't > exist. > > Is this behaviour correct? Should I be bugging the Jasper people about > this one? Are there any non-standards-breaking ways of getting around > this? > The path you specify as an argument to <jsp:include> has to be context relative. If "/mywebapp" is the context path of your webapp, then you should say: <jsp:include path="/myservlet" .../> instead of: <jsp:include path="/mywebapp/myservlet" .../> In addition, if you're using a web connector (instead of Tomcat standalone), you'll need to tell it to forward "/myservlet" paths to Tomcat -- this would also affect a direct requests to your servlet from a browser. > Thanks... > > Dave Keyes > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]