On Wed, 6 Feb 2002, Russ Trotter wrote:
> Date: Wed, 6 Feb 2002 23:04:40 -0700
> From: Russ Trotter <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: Tomcat Developers List <[EMAIL PROTECTED]>
> 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>