tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Broadhead <m...@bodyaspect.co.uk>
Subject RE: server mapping behaviour when directory structure mirrors mappings
Date Tue, 11 Dec 2007 13:22:30 GMT


Caldarale, Charles R wrote:
> 
>> From: Matthew Thomas Broadhead [mailto:matt@bodyaspect.co.uk] 
>> Subject: server mapping behaviour when directory structure 
>> mirrors mappings
>> 
>> <servlet-mapping>
>> 	<servlet-name>Sales</servlet-name>
>> 	<url-pattern>/sales</url-pattern>
>> </servlet-mapping>
> 
> If you look at the servlet spec (section 11.2), you'll see that the
> above is not valid other than for matching the exact request "/sales".
> Newer versions of Tomcat are more strict in their implementation of the
> rules in the spec, so it's not too surprising that 6.0 works properly
> and 4.1 let you slide by.
> 
> Looks like the <url-pattern> should really be "/sales/*" (without the
> quotes).
> 
>  - Chuck
> 

I want to match the pattern /sales but it instead adds an extra slash and
tries to list directory /sales/.  Is there any way to change the order in
which it resolves the url, i.e. check for servlet-mapping first, then check
for directory?
-- 
View this message in context: http://www.nabble.com/server-mapping-behaviour-when-directory-structure-mirrors-mappings-tp14250184p14273740.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message