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