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>
这样通配符才能正常使用。
自Struts2 2.5版本起,为增强安全性,默认启用了严格的方法调用。若要在包中使用通配符*,需设置strict-method-invocation=false。本文介绍如何正确配置以支持通配符。
3249

被折叠的 条评论
为什么被折叠?



