您的位置:首页 > 编程语言 > Java开发

究竟能菜到什么程度?—SSH(2)

2017-05-21 23:01 218 查看
对于使用struts2 2.3版本以后使用DMI方法不能有效访问action,出现类似HTTP Status 404 - There is no Action mapped for namespace [/] and action name [loginAction] associated with context path [/xxxxxxx].的报错情况的解决方法如下:

1.在package标签下添加

<global-allowed-methods>regex:([A-Za-z0-9_$]*)</global-allowed-methods>

2.在action标签下添加allowed-methods,加入对应的方法名,多个方法名以逗号隔开
<allowed-methods>login</allowed-methods>

两种方法均亲测有效。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  jsp servlet ssh struts