Hello again Craig,

  Well, after going back into my filter setup again, I see that for Tomcat
4.0.1, i have the same setup that I describe in my example below (e.g. a
url-pattern of "/files/*" for the <filter-mapping> element in web.xml) but
the call to getServletPath() inside that filter returns "/files/foo.jpg" and
getPathInfo() returns null for a request of "/context/files/foo.jpg".

  Where's the error? (me, Tomcat, the spec, or all of the above) :-)

russ


----- Original Message -----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 9:09 AM
Subject: Re: servlet-path, path-info and Filters


>
>
> 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]>
>
>


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

Reply via email to