tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Understanding url-patterns
Date Tue, 08 Dec 2009 17:23:49 GMT
Jonathan Mast wrote:
> Are URL Patterns ending in a wild card allowed by the Servlet Spec?
> I have this pattern setup with the intention of binding every url that
> begins with "foo" to a serlvet
> <servlet-mapping>
>     <servlet-name>MultiFooService</servlet-name>
>     <url-pattern>/foo*</url-pattern>
> </servlet-mapping>
> But http://localhost/foo1, ...foo2,<ANYTHING> gives me a 404
> Only http://localhost/foo* actually resolves to the servlet.
> Do I have the syntax wrong?  I seen examples like
> <url-pattern>/*.jsp</url-pattern>, so is there some different notation
> required for wildcards at the end of the pattern?
> Tomcat 6.0.20
I think you really need to read the corresponding section of the servlet 
specs for that, because these URL patterns are not the same as filespec 
patterns, and not regexpes either.  Their interpretation is really 
Don't ask why.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message