You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carles Pi-Sunyer <ca...@stario.com> on 2000/12/02 02:51:11 UTC

getPathInfo() in 3.2

I'm having a problem moving an application from 3.1 to 3.2.

My webapp is mapped to /host, 
the main servlet in the webapp is handled by just /.

In 3.1, with the following url: 

localhost:8080/host/example/Home/ 

getPathInfo() would return:

/example/Home/

in 3.2 getPathInfo() returns null for the same url.

Any ideas?

Thanks,
Carles


Re: getPathInfo() in 3.2

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Carles Pi-Sunyer wrote:

> I'm having a problem moving an application from 3.1 to 3.2.
>
> My webapp is mapped to /host,
> the main servlet in the webapp is handled by just /.
>
> In 3.1, with the following url:
>
> localhost:8080/host/example/Home/
>
> getPathInfo() would return:
>
> /example/Home/
>
> in 3.2 getPathInfo() returns null for the same url.
>

Tomcat 3.1 did not conform to the servlet 2.2 specification errata for how
mapping works for the default servlet (which is not surprising, because it was
released before the errata was published), but Tomcat 3.2 does.  See:

    http://java.sun.com/products/servlet/errata_042700.html

item #4.  For your scenario, you should call getServletPath() instead of
getPathInfo() to return "/example/Home/".

>
> Any ideas?
>
> Thanks,
> Carles

Craig McClanahan