stackoverflower
stackoverflower

Reputation: 4063

In Tomcat 7, can I use regular expressions in <url-pattern>?

Does Tomcat 7 have such a facility? Although I could write a filter to parse regular expression in url, it would make another project. I think such a facility should be provided in mainstream servlet containers.

Upvotes: 2

Views: 1024

Answers (1)

BalusC
BalusC

Reputation: 1109302

The Servlet API specification does not specify that. So no one container supports it.

Best what you can get is using Tuckey's URLRewriteFilter. It's much similar to HTTPD's mod_rewrite.

Upvotes: 2

Related Questions