jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [advanced-servlets] getServletPath and filters?
Date Thu, 07 Feb 2002 15:47:06 GMT


On Thu, 7 Feb 2002, Greg Wilkins wrote:

> Date: Thu, 07 Feb 2002 16:17:39 +1100
> From: Greg Wilkins <gregw@mortbay.com>
> Reply-To: Watchdog Developers List <watchdog-dev@jakarta.apache.org>
> To: advanced-servlets@yahoogroups.com,
>      Watchdog Developers List <watchdog-dev@jakarta.apache.org>
> Subject: Re: [advanced-servlets] getServletPath and filters?
>
>
> OK,
>
> I implemented it as for the default servlet (servletPath==""
> and pathInfo==URIAfterContext)
>
> But I immediately got a report that tomcat4 does it the other
> way around  servletPath==URIAfterContext  pathInfo=null.
>

Yep.  This is covered in a sentence in Section 11.2, about the
specification of mappings:

  "A string containing only the '/' character indicates
  the "default" servlet of the application.  In this case
  the servlet path is the request URI minus the context
  path and path info is null.

> I agree with Nic's interpretation so I'm just replying to let you
> all know (and to cc the watchdog list so they can add a test for this).
>
> cheers
>

Craig McClanahan


>
> Nic Ferrier wrote:
> > Greg Wilkins <gregw@mortbay.com> writes:
> >>For a filter invoked on a request destined for static content, what
> >>should getServletPath and getPathInfo return in the filter?
> >>
> >>As there is no servlet involved, then I think that getServletPath should
> >>return null and getPathInfo return the non context part of the path.
> >>
> >>I can't see anything in the spec about this????
> >>
> >>Any thoughts?
> >>
> >
> > The servlet api doesn't have any concept of static content.
> >
> > There is only "default servlet".
> >
> > If you look in the mapping examples for "default servlet" then you'll
> > see what should be returned.
> >
> >
> > Nic
> >
> > ------------------------ Yahoo! Groups Sponsor ---------------------~-->
> > Sponsored by VeriSign - The Value of Trust
> > When building an e-commerce site, you want to start with a
> > secure foundation. Learn how with VeriSign's FREE Guide.
> > http://us.click.yahoo.com/kWSNbC/XdiDAA/yigFAA/saFolB/TM
> > ---------------------------------------------------------------------~->
> >
> > Before posting a question, try to find your answer here:
> > <http://www.egroups.com/links/advanced-servlets>
> > Announcements should go to: advanced-servlets-announce@egroups.com
> > To Post a message, send it to: advanced-servlets@eGroups.com
> > To Unsubscribe, send a blank message to: advanced-servlets-unsubscribe@eGroups.com
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
> --
> Greg Wilkins<gregw@mortbay.com>          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:watchdog-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:watchdog-dev-help@jakarta.apache.org>
>
>


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


Mime
View raw message