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.
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
.
精彩评论