This one really belongs in an FAQ. Section 11.1 bullet 3 of the servlet-2.3 spec states that: <spec-quote> If the last segment in the URL path contains an extension (e.g. .jsp), the servlet container will try to match a servlet that handles requests for the extension. An extension is defined as the part of the last segment after the last '.' character. </spec-quote>
In particular, it is not possible to have "extra path" information on a JSP page (unless you declare it to be prefixed-mapped in your web.xml). "Tony LaPaso" <[EMAIL PROTECTED]> wrote in message 009301c244dc$6b688120$74c1f80c@abner">news:009301c244dc$6b688120$74c1f80c@abner... > Hi all, > > I was hoping someone could explain something. I'm not sure if > this is a Tomcat issue or a JSP issue. > > I'm using Tomcat v4.1.8 on Win 2k. > > It seems I cannot obtain the "extra path" information at the end > of a URL from within a JSP. But, if I run the servlet that was > generated from the JSP, I *can* get the extra path information > with no problem. > > For example, below is a simple JSP (named Test.jsp) which I > invoke using the URL below. Notice "/extra/path/info" is the > extra path information at the end of the URL: > http://localhost/t/Test.jsp/extra/path/info: > > > <html><head><title>Test</title></head> > <body> > <p> > This is a test... > <%= "Path Info: " + request.getPathInfo() %> > </p> > </body></html> > > > When I run this JSP it produces the output: > > "This is a test... Path Info: null" > > Notice the request.getPathInfo() is returning null. > > Now, if I take the generated servlet class file and place it in > my WEB-INF/classes directory, and I run the servlet with this > URL: > > http://localhost/t/servlet/org.apache.jsp.Test_jsp/extra/path/inf > o > > I get this output: > > "This is a test... Path Info: /extra/path/info" > > So, why can a JSP not have access to the extra path information? > Is this a Tomcat configuration issue or something else? > > Thanks... > > Tony -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
