Struts2中DMI(动态方法调用)的错误问题(There is no Action mapped for namespace [/xxx] and action name [xxx!yyy] a)

时间:2024-01-05 10:29:02

默认的Struts.xml中是这样的

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

There is no Action mapped for namespace [/xxx] and action name [xxx!yyy] associated with context path [xxx]

这样我们在地址栏输入感叹号动态调用方法的时候会出错,我们只需更改这一句即可

<!-- 打开Struts的DMI -->
    <constant name="struts.enable.DynamicMethodInvocation" value="true" />