代码改变世界

Struts2中there is no action mapped for acion name (/XXXXX)

2017-04-13 10:08  叶思维  阅读(202)  评论(0编辑  收藏  举报

这里的问题出在配置struts.xml中,去掉配置中 namespace="/"属性 即可解决。不同的调用action的方式对namespace="/"属性有的无法识别,有的则可以,我在JSP页面中通过 s:action="XXXX"调用,在struts.xml中有namespace="/"属性时, 执行项目就会显示如上错误,去掉 即可用。