我配置了一个user_*的action
<action name="user_*" class="userAction" method="{1}">
<result name="registPage">/WEB-INF/jsp/regist.jsp</result>
<allowed-methods>registPage</allowed-methods>
</action>
- 1
- 2
- 3
- 4
调用registPagede 总是提示找不到页面方法,
原因是在struts2.3版本之后,使用通配符调用方法时,内部会验证是否允许访问该方法,所以要在Action中加上
<allowed-methods>delete,update,insert,select</allowed-methods>
- 1
默认配置了:
(解决方法:你可以进行修改源码配置,也可以添加以上的方法名进行配置)
<global-allowed-methods>execute,input,back,cancel,browse,save,delete,list,index</global-allowed-meth