A JSP page (that is using the default "*.jsp" mapping) can't have PathInfo
(section 10.1 of the 2.2 spec, or 11.1 of the 2.3 spec).  If PathInfo ==
null, then IMHO, then Tomcat "cannot determine a valid file path", and so
must return null from getPathTranslated (section 5.5, resp section 4.5).
ServletContext.getRealPath("/") should give the file-system path to the
context (although it will also return null under 4.x if you are using war
files of course).

Of course, if the JSP page is defined in the web.xml as a prefix-mapped
servlet, then getPathTranslated and getPathInfo should work as expected.
----- Original Message -----
From: "Anand Bashyam Narasimham" <[EMAIL PROTECTED]>
To: "Tomcat Dev Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 11:32 AM
Subject: getPathInfo problem


> Hi,
>
> I know there's been a lot of discussion around this and the bug filed says
> it's a "WORKSFORME" but somehow if I just install TOmcat3.3 and run the
> Snoop JSP in the example I get a "null" on getPathInfo as well as
> getPathTranslated(). Is there something that needs to be set on the
servlet
> mapping etc.
>
> If some on can give a concrete answer as to why this is so much a problem
it
> would be of great help. I tried a JSP with calls to getPathInfo() and
> getPathTranslated() on WebLogic 5.1 and the getPathTranslated works fine
but
> returns null in Tomcat.
>
> Anand
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


*----*

This message is intended only for the use of the person(s) listed above 
as the intended recipient(s), and may contain information that is 
PRIVILEGED and CONFIDENTIAL.  If you are not an intended recipient, 
you may not read, copy, or distribute this message or any attachment.  
If you received this communication in error, please notify us immediately 
by e-mail and then delete all copies of this message and any attachments.


In addition you should be aware that ordinary (unencrypted) e-mail sent 
through the Internet is not secure. Do not send confidential or sensitive 
information, such as social security numbers, account numbers, personal 
identification numbers and passwords, to us via ordinary (unencrypted) 
e-mail. 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to