Struts2排除了模式正则表达式问题

时间:2017-10-16 18:13:23

标签: spring struts2

我有一个要求,如果URL在路径中包含spring,那么应该排除struts并且应该处理spring dispatcher servlet。

我尝试过以下模式 constant name =“struts.action.excludePattern”value =“ .spring。”/>

要跳过的网址:http://localhost:8080/spring/getAllUsers http://localhost:8080/spring/getUserByName

但是我收到的错误就像是从struts映射的无操作。请建议

1 个答案:

答案 0 :(得分:0)

使用.*表示零个或多个字符,如:

<constant name="struts.action.excludePattern" value=".*spring.*" />