开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜