http://localhost:8080/a/...
http://localhost:8080/b/...
http://localhost:8080/test/....
其中 a 对应 a.war 目录,b 对应 b.war 目录,test 对应 test.war 目录
若在 test.war 中部署一个 filter ,url-pattern 设置成 /* ,则:
受影响的 url 包括:
http://localhost:8080/test/...
http://localhost:8080/test/index.jsp
http://localhost:8080/test/abc/index.jsp
不受影响的 url 包括:
http://localhost:8080/a/...
http://localhost:8080/b/...
即此时 filter 仅作用于本应用内部,由于 /* 等价于 {ContextPath}/* ,而此时的 {ContextPath} 等价于
http://localhost:8080/test/