【发布时间】:2012-04-26 20:20:36
【问题描述】:
我创建了一个Filter 来检查带有请求对象的Cookies 和forward 相应的请求,这要感谢this 和this 问题..现在我想映射这个Filter 只是welcome-file,正如我在 web.xml 中声明的那样。
假设我将welcome-file 设置为index.html,那么我必须为www.example.com/ 和www.example.com/index.html 映射Filter,但不允许为其他任何东西,例如www.example.com/foo/* 或www.example.com/*,我的意思不是任何东西除了welcome-file 请求。
我正在使用 Apache Tomcat 7.0.22 容器。
【问题讨论】:
标签: java tomcat mapping servlet-filters