HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userAction!add] assoc
来源:互联网 发布:什么是aso优化 编辑:程序博客网 时间:2024/04/30 08:06
在struts2开发中,动态Action处理,因为自己是新手,总是遇到如下问题
HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userAction!add] associated with context path [/Struts2].
网上查询,很多人都说是 如下几种错误:
1,struts.xml文件名错误。一定要注意拼写问题;
2,struts.xml文件放置路径错误。一定要将此文件放置在src目录下。编译成功后,要确认是否编译到classes目录中;
3,struts.xml文件内容错误。struts2.xml配置时拼写有错等
4,看看web.xml中是否对跳转的jsp文件都配置了。
我仔细检查,并没有出现错误。后来经过多方查找资料后来发现因为我此处是有!(叹号)做动态Action处理,所以需要在struts2中配置<constant name="struts.enable.DynamicMethodInvocation" value="true"></constant>。如图:
配置完这一条后,问题顺利解决了,虽然这是一个比较简单的问题,但是作为新手也是忙活了半个晚上,不过问题解决了还是很高心的。
0 0
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userAction!add] assoc
- HTTP Status 404 There is no Action mapped for namespace / and action name
- Struts2:HTTP Status 404 - There is no Action mapped for namespace[ / ]and action name singleUpload.
- HTTP Status 404 - There is no Action mapped for namespace [/user] and action name [>] associated wit
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [BsMmWeb] associated w
- HTTP Status 404 There is no Action mapped for namespace / and action name
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [login!welcome] associ
- struts异常:HTTP Status 404 - There is no Action mapped for namespace [/] and action name [promotion]
- HTTP Status 404 - There is no Action mapped for namespace / and action name aa.jsp.
- Struts2框架中HTTP Status 404 There is no Action mapped for namespace / and action name
- 异常HTTP Status 404 There is no Action mapped for namespace / and action name
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [result] associated wi
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [c_list] associated wi
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [] associated with con
- HTTP Status 404 - There is no Action mapped for namespace /jsp and action name login. type Status re
- There is no Action mapped for namespace / and action name UserAction
- J2EE Struts2关于"There is no Action mapped for namespace / and action name UserAction"的调试
- There is no Action mapped for namespace / and action name UserAction
- HDU 5480 Conturbatio 树状数组
- 越狱的手机显示时间出错
- LINUX进程优先级的设置和一些注意地方
- 深度体感设备
- pyqt layout 如何不被遮挡
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userAction!add] assoc
- 实习笔记(四)
- git多账号登录问题
- 有趣的C语言--函数声明和形参问题
- CSS3备忘
- 类加载机制
- Android抽象布局——include、merge 、ViewStub
- 【计算几何】 叉乘求多边形面积<凹凸均可>
- uboot命令详解