Recently updated struts version found that no matter how the access is not mapped to the specified configuration file, and finally found that the reason for access control. After struts2.3, for access security, the request method interception is increased, which causes error hints that cannot be found when using wildcards to access the mapped object:
There is no action mapped for namespace [/] and Action name [M_hi] associated with context path [].
WORKAROUND: 1 If your referral package Struts2-core is more than 2.3, you need to update the Struts.xml file header:
<! DOCTYPE struts public "-//apache software foundation//dtd struts Configuration 2.5//en" "/http Struts.apache.org/dtds/struts-2.5.dtd ">
2 and open method access in Struts.xml:
Mode one: Global configuration
<package name= "Default" extends= "Struts-default" >
<global-allowed-methods>regex:.*</global-allowed-methods>
</package>
Mode two: The action tag within the configuration (multiple methods comma separated)
<action name= "Login" method= "login" class= "Loginaction" >
<result name= "Login" >/WEB-INF/login.jsp</result>
<allowed-methods>login</allowed-methods>
</action>
There is no Action mapped for namespace [/] and Action name [M_hi] associated with context path []