tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Forwarding based on URI's in Tomcat
Date Thu, 02 Aug 2007 12:41:59 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill,

Bill Barker wrote:
> "Christopher Schultz" <chris@christopherschultz.net> wrote in message 
>>       <servlet-name>action</servlet-name>
>>       <url-pattern>/mymodule/sexy*</url-pattern>
>>       <url-pattern>/mymodule/sexy</url-pattern>
>> 
>> That is, map both "/sexy*" and "/sexy" to the servlet.
> 
> 
> Nope, "/sexy*" is an exact-match pattern to a URL that is literally 
> "/myapp/sexy*".  The servlet-spec doesn't implement arbitrary regex 
> patterns, only the ones specified.  In this case you need to have the 
> url-pattern to be /sexy/* to get a prefix match.  And, yes, this will match 
> to a URL of "/myapp/sexy" (with an empty pathInfo).

I'm pretty sure that the trailing "/" is required in the pattern
"/sexy/*", so it would match "/sexy/" but not "/sexy". I don't think
that / counts as part of a wildcard expression.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsdEX9CaO5/Lv0PARAudJAKCxJiF7GukKtxB+8W4hwmZ0jbaoKACfVDWO
BcXGvffve4h4rdU0GNiHgeY=
=c4y5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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