Is it possible to use regular expressions in web.xml's servlet mapping?

2006-05-18 Thread Paul Hamer
Hi All! I want to map a single servlet to multiple URLs. Ofcourse in web.xml I could do this, which works fine: servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/one/*/url-pattern /servlet-mapping servlet-mapping servlet-nameMyServlet/servlet-name

Re: Is it possible to use regular expressions in web.xml's servlet mapping?

2006-05-18 Thread Mikolaj Rydzewski
Paul Hamer wrote: But I know that for instance Resin supports the url-regexp tag, so I could do: servlet-mapping servlet-nameMyServlet/servlet-name url-regexp/(one|two)/.*/url-regexp /servlet-mapping Which I think is much neater :) Is there any way to do this using Tomcat 5.5 ?

Re: Is it possible to use regular expressions in web.xml's servlet mapping?

2006-05-18 Thread Tim Funk
There is no regex support for URI mapping. At one time it was to be part of the 2.5 servlet spec - but for reasons unknown to me - it was yanked. -Tim Paul Hamer wrote: Hi All! I want to map a single servlet to multiple URLs. Ofcourse in web.xml I could do this, which works fine: