I'm using Tomcat 3.2.1 with it's own http server.

It's pretty simple to demonstrate... basicly, try and get the follwing 
code to print out something other then "null"

<%= request.getPathInfo() %>

I can't seem to do it with a jsp, but have used it many times in servlets.

I have tried this on both NT 4.0 and FreeBSD 4.3 with the same results...

thanks,

-gus

Glenn Nielsen ([EMAIL PROTECTED]) wrote:
> Hi Gus,
> 
> Which version of Tocmat are you using? Are you using Apache
> as a front end to Tomcat?
> 
> I searched bugzilla and didn't find any bugs reported for
> any version of Tomcat related to passing pathinfo with
> a jsp page request.
> 
> Glenn
> 
> Gus Mueller wrote:
> > 
> > Hi.
> > 
> > I'm finding that when I try and append extra "path" info to my jsp's like
> > I have in the past my servlets, I get back a page not found.
> > 
> > Ok, I can sort of understand that- it's not a real page.. but...
> > If I have a url that's like this:
> > 
> > http://localhost/foo/bar.jsp
> > and I make a request like this:
> > http://localhost/foo/bar.jsp/extra/path/info?querystring
> > 
> > It gives me back a 404... this isn't the case with servlets.
> > I can do:
> > 
> > http://localhost/foo/servlet
> > as the real servlet and:
> > http://localhost/foo/servlet/extra/path/info?querysting
> > works just find.
> > 
> > eh? Is this supposed to not work with jsp's?  Or have I found a bug I can
> > fix?
> > 
> > For what it's worth, I hacked up ContextManager.java and added this at the
> > top of processRequest() to get it to at least find my url.
> > 
> >     String r = req.getRequestURI();
> >     int x = 0;
> >     if ((x = r.indexOf(".jsp/")) > 0) {
> >         String pathinfo = r.substring(x + 4);
> >         String without_path = r.substring(0, x + 4);
> > 
> >         req.setRequestURI(without_path);
> >         req.setPathInfo(pathinfo);
> >     }
> > 
> > Granted the req.getPathInfo() still returns null when I try and use it
> > in my jsp's later on, but at least it can find my pages now...
> > 
> > Thoughts?  Suggestions?  Am I out of my mind?
> > 
> > thanks,
> > 
> > -gus
> > 
> > --
> > "Christmas means carnage!"  -- Ferdinand, the duck
> 
> -- 
> ----------------------------------------------------------------------
> Glenn Nielsen             [EMAIL PROTECTED] | /* Spelin donut madder    |
> MOREnet System Programming               |  * if iz ina coment.      |
> Missouri Research and Education Network  |  */                       |
> ----------------------------------------------------------------------

-- 
-gus

-- 
"Christmas means carnage!"  -- Ferdinand, the duck

Reply via email to