首页 > 其他 > 详细

struts2使用!动态方法调用无效,报错

时间:2015-06-15 16:17:32      阅读:208      评论:0      收藏:0      [点我收藏+]

前几天一直在复习stuts2框架的使用,就自己打了一个小程序测试,

不过在开发过程中,出现了一个问题,那就是使用!访问的时候,会报异常:

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
  • There is no Action mapped for namespace [/user] and action name [user!add] associated with context path [/mySSH].

Stacktraces

There is no Action mapped for namespace [/user] and action name [user!add] associated with context path [/mySSH]. - [unknown location]
 

因为是照着教程上的做的,并没有发现问题,在经过了一番查找后,才发现是没有打开Struts2的!调用功能。

需要在struts.xml文件中添加

<constant name="struts.enable.DynamicMethodInvocation" value="true" />

打开功能就可以了。

 

struts2使用!动态方法调用无效,报错

原文:http://www.cnblogs.com/zhy1008/p/4577259.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!