tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [T4] More mapping problems
Date Thu, 14 Jun 2001 21:04:25 GMT


On Thu, 14 Jun 2001, Remy Maucherat wrote:

> Hi Craig,
> 
> (putting on my Catalina user hat)
> 
> I found a case where I think adding the default configuration mapping is done 
> wrong.
> 
> For example, you can choose to map a servlet to /*, in which case you would 
> expect it to handle all requests. That's not what happens because the default 
> config will add a mapping of the default servlet on "/".
> 
> The mapper will then send a request on "/" to the default servlet, and every 
> other URL to the other servlet.
> 
> In addition to just checking if the mappings are indentical, I think we should 
> check inclusion too (here, / is included in /*).
> 

If you have a mapping for "/*" defined, the default servlet should never
receive *any* requests.  If it does, the mapper implementation is
broken.  Note that it doesn't make any difference whether the loading was
done from the default web.xml or the application one.

A <servlet-mapping> of "/" does not literally mean mapping to the
"/" path.  Instead, it is simply a marker that says this is the default
servlet.

> (back to the developer hat)
> 
> Is it ok if I implement this behavior ?
> 

Please go ahead and fix the mapping if it's doing "/" paths wrong.

> Remy
> 

Craig



Mime
View raw message