Russ, The URL pattern for the filter should have no effect on the getServletPath of the request. What if I had filters mapped to /*, /files/* and /files/foo.jpg Is the request going to be changed between each filter? The path methods should reflect the target resource, not the filter matching criteria. Thus for ServletRequests destined for static resources, using the default match behaviour makes the most sense for me. For now that is what is implemented in Jetty4. I have CC'd this to Craig so you don't have to be a go between. I also included the watchdog-dev list as they should probably make a call one way or the other and test for it. cheers Russ Trotter wrote: > Greg (et al) > > I just got a response from Craig McClanahan in the Tomcat group. He says > that for the example of: > > filter url-pattern of "/files/*" > and a request of "/context/files/foo.jpg" > that getServletPath() should return "/files" and getPathInfo() should return > "/foo.jpg". > > It seems that his understanding is that the handling for servlets/filters is > the same. The the url-pattern of the filter/servlet defines what > getServletPath() and getPathInfo() should return. > > Does that make any sense? :) > russ > > Here's his response (with my original question): > > >>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 > > > > > > > ------------------------ Yahoo! Groups Sponsor ---------------------~--> > Sponsored by VeriSign - The Value of Trust > Pinpoint the right security solution for your company - FREE > Guide from industry leader VeriSign gives you all the facts. > http://us.click.yahoo.com/lWSNbC/WdiDAA/yigFAA/CefplB/TM > ---------------------------------------------------------------------~-> > > For the latest information about Jetty, please see http://jetty.mortbay.org > > To alter your subscription to this list goto >http://groups.yahoo.com/group/jetty-discuss > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ > > -- Greg Wilkins<[EMAIL PROTECTED]> GB Phone: +44-(0)7092063462 Mort Bay Consulting Australia and UK. Mbl Phone: +61-(0)4 17786631 http://www.mortbay.com AU Phone: +61-(0)2 98107029 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
