You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Anand Bashyam Narasimham <an...@digitalthink.com> on 2001/12/05 20:32:08 UTC

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: getPathInfo problem

Posted by Bill Barker <wb...@wilshire.com>.
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" <an...@digitalthink.com>
To: "Tomcat Dev Mailing List (E-mail)" <to...@jakarta.apache.org>
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:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


*----*

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: getPathInfo problem

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 5 Dec 2001, Anand Bashyam Narasimham wrote:

> Date: Wed, 5 Dec 2001 11:32:08 -0800
> From: Anand Bashyam Narasimham <an...@digitalthink.com>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: "Tomcat Dev Mailing List (E-mail)" <to...@jakarta.apache.org>
> 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
>

As I asked for (twice!) in the bug report dialog, can you please provide a
test case that shows exactly what you think is wrong?  The original
statement in the bug report was not correct, and you have not provided the
detail of exactly what behavior you are seeing, and what you are
expecting.

Without that, there's nothing anyone here can do.

Craig McClanahan


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