HTTP Status 404 There is no Action mapped for namespace / and action name
来源:互联网 发布:软件项目经理工作内容 编辑:程序博客网 时间:2024/06/04 18:36
转自:http://blog.csdn.net/xwin1989/article/details/6555267
在首次进行struts的开发中,初学者经常会遇到HTTP Status 404 There is no Action mapped for namespace / and action name 的问题,出现上述的问题,大概从以下几个方面进行检查:
(1)首先,检查struts.xml的位置,一般在eclipse或者myeclipse下放在src目录下,在运行后,我们可以看到,我们在src中所写的类,struts.xml,在web-inf下的classes下都能找到。其中类都已经编译通过变成了.class文件。
(2)其次注意路径的问题,仔细检查是不是在相对路径方面除了问题。
(3)检查拼写,这个问题一定要避免放生,一些小的错误比如说把struts.xml写成了sturts.xml或者写成了struts2.xml,单词的拼写错误,这些都会导致上述错误。
(4)还有一点就是设置struts内部 属性时》
<package name="message" namespace="/web/message" extends="struts-default" > <action name="savemessage" class="com.edaiyan.action.MessageAction"> <result name="save">/web/message/messageList.jsp</result> </action> </package>
要注意namespace属性! 如果你的目录为 WEBROOT---web---message----message.jsp
那么要注意 你的package包属性 namespace 必须与你的 目录一致 /web/message (From 调用action 在message.jsp中)
附加上message中From》
<s:form action="savemessage.action" > <s:hidden name="messageStatu.id" value="1"></s:hidden> <s:textarea name="content" label="留言内容:" rows="5"></s:textarea> <s:submit value="提交"></s:submit> </s:form>
请注意~~~ action="savemessage.action"
以及 namespace="/web/message"
- 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 [userAction!add] assoc
- 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
- SSH整合DWR时报HTTP Status 404 - There is no Action mapped for namespace / and action name dwr.
- ssh整合DWR的时候报 HTTP Status 404 - There is no Action mapped for namespace / and action name bookInfo.
- struts.xml不在默认位置,导致出现HTTP Status 404 - There is no Action mapped for namespace [/] and action name [
- iOS开发中extension的用法(延展)
- Android通过PHP连接MySQL(读取)
- Unity游戏开发的数学与物理 3 ( 让物体延任意方向移动 )
- android 下拉刷新控件
- 新浪微博、微信朋友圈、qq空间分享---微信朋友圈
- HTTP Status 404 There is no Action mapped for namespace / and action name
- C#连接SQL server
- Redis命令参考简体中文版
- ele.me答案系列之——第5题
- 中间件开发技能要求-图形化展示
- apache配置静态文件缓存
- c++第9题
- 零碎的知识点
- JavaScript中Date对象使用总结