开发者

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

开发者 https://www.devze.com 2023-04-08 13:09 出处:网络
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 main

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号