struts2从2.5版本开始,为了提升安全性,默认开启了严格的方法调用。
如果要使用通配符*,必须在package中设置 strict-method-invocation="false",代码如下:
<package name="user" extends="struts-default" strict-method-invocation="false">
<action name="*" class="com.hanhai.web.action.UserAction" method="{1}">
<result name="success">/Login.jsp</result>
</action>
</package>
这样通配符才能正常使用。