<action name="hellowword" class="com.Action.hellowAction">
<result >/result.jsp</result>
<result name="add">/add.jsp</result>
<result name="update">/update.jsp</result>
</action>
<result >/result.jsp</result>
<result name="add">/add.jsp</result>
<result name="update">/update.jsp</result>
</action>
http://localhost:8080/struts_hellowworld/aaa/hellowworld!.action
发现并不能使用成功,那是因为在struts2.3版本后动态方法调用的话 默认设成FALSE 了 ,必须手动设置成TRUE才有效.
<constant name="struts.enable.DynamicMethodInvocation" value="true"> </constant>
本文介绍在Struts2框架中如何正确配置动态方法调用功能。针对Struts2.3版本之后,默认禁用了动态方法调用,需要通过配置文件将其启用。文章提供了具体的配置示例。
158

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



