tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: servlet-path, path-info and Filters
Date Thu, 07 Feb 2002 16:09:53 GMT


On Wed, 6 Feb 2002, Russ Trotter wrote:

> Date: Wed, 6 Feb 2002 23:04:40 -0700
> From: Russ Trotter <russtrotter@yahoo.com>
> Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> Subject: servlet-path, path-info and  Filters
>
> Does anyone here know what the official correct handling of
> ServletRequest.getServletPath() and ServletRequest.getPathInfo() should be?
> More specifically, if I specify a filter with an url-pattern of "/files/*"
> and I make a request to "/context/files/foo.jpg", what should
> getServletPath() and getPathInfo() return?
>
> I've observed some differing behavior between Tomcat 4.0.1 and Jetty in this
> regard and the spec doesn't explicitly clear up the issue between the two.
>

The rules are in the Servlet 2.3 Specification, section 11.  In your
particular example, getServletPath will return "/files" and getPathInfo()
will return "/foo.jpg".

> Thanks,
> russ
>

Craig


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message