struts 2.5 There is no Action mapped for namespace [/] and action name [user_find] associated with context path [/struts2_crm].

时间:2023-03-08 20:30:35

遇到了这个错误.

There is no Action mapped for namespace [/] and action name [user_find] associated with context path [/struts2_crm].

2.5里面要在package添加如下tag

<global-allowed-methods>regex:.*</global-allowed-methods>

e.g.

<package name="crm" extends="struts-default" namespace="/">
<global-allowed-methods>regex:.*</global-allowed-methods>
<action name="user_*" class="cloud.web.action.UserAction" method="{1}">
<result name="findSuccess">/jsp/user/list.jsp</result>
</action>
</package>