tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Johnson <jer...@archaeopteryx.freeserve.co.uk>
Subject Re: Default servlet?
Date Sat, 24 Jun 2000 13:47:57 GMT
Hi Craig,

> Here's the point where I say "read the servlet specification, please!"

Sorry, but I **was** looking at that Section 10.2 when I wrote the email..

>     "A string containing only the '/' character indicates that the servlet
>     specified by the mapping becomes the "default" servlet of the
>     application.

My question is, when I set a default servlet as above, why does this have to
prevent Tomcat serving any/all static files (eg. /furniture/button.jpg) ?

Jeremy.






On Sat, 24 Jun 2000, you wrote:
> Jeremy Johnson wrote:
> 
> > Hi Craig,
> >
> > Many thanks for your reply, a brief thought on the servlet mapping. You said
> > that if I map "/" to a servlet then Tomcat will no longer serve static files,
> > but is that syntactically correct? I mean, the static files (eg. *.jpg's) arn't
> > at "/", they're at (eg.) "/furniture/button.jpg", so how come that matches "/" ?
> >
> 
> Here's the point where I say "read the servlet specification, please!"
> 
> In particular, see Section 10.2, the fourth bullet, which says:
> 
>     "A string containing only the '/' character indicates that the servlet
>     specified by the mapping becomes the "default" servlet of the
>     application.
> 
> In other words, this mapping is treated specially.  It is not treated as a pattern
> match.  You will also want to look back up the page at Section 10.1, which describes
> *exactly* how Tomcat, or any other servlet container that complies with the 2.2
> specification, is supposed to map requests to servlets.
> 
> The servlet spec is available for download at:
> 
>     http://java.sun.com/products/servlet/download.html
> 
> 
> >
> > Jeremy.
> 
> Craig McClanahan
> 
> 
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message