Paul Philion wrote:
>
> James -
>
> I just downloaded the latest code and I'm building it now. After looking over 
>section 10 of the 2.2 spec, I realized that the servlet mapping was really up to the 
>servlet engine vendor (before 2.2).
>
> I also took a closer look at the 2.2 spec, and I've got a question (just a question):
>
> The 2.2 spec allows for both "/*" and "/", but they seem to have the same result; 
>acting at the "default servlet". What is the difference? Can you give an example URL 
>where that would trigger one and not the other?

hmmmm ... i had to re-read the spec myself on this one.

i'd agree that the patterns "/*" and "/" should resolve
to the same servlet. in this case it is known as the
DefaultServlet because will handle all requests that
are not picked up by peer (in the same web app) servlets.

that said i can see how it could be possible to register
a "/*" path mapped servlet which could aggressively pick
up requests that should've been handled by an exact path
mapped servlet. the tomcat implemenation
(org.apache.tomcat.core.RequestMapper.getMatch()) takes care
of this situation by giving path patterns precedence over
prefix and extension mapped servlets.

hope this helps,

- james

>
> Thanks,
>
> - Paul Philion
>
> James Todd wrote:
> >
> > hi paul -
> >
> >         i recently added a patch to the tomcat
> >         (http://jakarta.apache.org) code which should
> >         allow for one to map, per the servlet 2.2
> >         (http://java.sun.com/products/servlet/2.2)
> >         web application conventions, "/*" to a servlet.
> >         in effect, a singular servlet will be the
> >         target for *all* web requests for a specific
> >         web application context.
> >
> >         hope this helps,
> >
> > - james
> >
> > Paul Philion wrote:
> > >
> > > Greetings...
> > >
> > > [Note: I have read the FAQs, Jason's book and searched the archives. I have 
>tinkered for several hours. I still can't figure this out, so...]
> > >
> > > I am trying to map a servlet to a top level request. From the mapping.properties 
>file:
> > >
> > >   /=route
> > >   /route=route
> > >
> > > and from servlet.properties:
> > >
> > >   route.code=RoutingServlet
> > >   route.initparams=mapping=bmfip.txt
> > >
> > > Everything works great if I simply use http://<server>/route, but I want to map 
>the top level request into the same servlet. It don't work! Instead, I get the 
>standard index.html page provided by JSWDK.
> > >
> > > For some reason, I am sure this is possible. I just can't figure out how to get 
>it.
> > >
> > > Thanks (in advance),
> > >
> > > - Paul Philion
> > >
> > > ___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources: http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> > ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to