There is no Action mapped for namespace [/] and action name [login] associate解决办法
来源:互联网 发布:java 64位win7 编辑:程序博客网 时间:2024/06/05 05:47
今天闲着没事就写了一个JSP项目,在配置struts2时遇到了这个错误,在网上逛了一大圈后终于解决了这个问题。具体解决方法是:
1、struts.xml的名字和位置
这里特别提一点,很多人遇到这个错误都是名字错误,比如写成struts-login.xml但又没在web.xml中进行相关配置。struts.xml是struts2的默认配置名字所以不用再web.xml中配置。 第二点是位置问题,很多人说是放在src根目录下,其实不然,在部署后的web项目中是没有这个目录的试问struts2又怎么访问这个配置文件?正确的是放在WEB-INF/classes目录下,有些用myeclipse的朋友可能会说:“怎么我放在src目录下还是能运行呢?”这是因为IDE在部署项目时将struts.xml自动拷贝到了WEB-INF/classes下。我就是自己用ant完成这个拷贝步骤的。
2、Form表单
在表单中设置属性时如果使用的不是默认命名空间一定要声明。
3、struts.xml内容
一定要确认action的name属性填写无误,其实在一般的小型项目中使用默认命名空间就够了,不用设置namespace属性。此外一定要确认classes目录下有相应action的class类文件。
就这么多了,希望大家都能够顺利解决自己的问题!
- There is no Action mapped for namespace [/] and action name [login] associate解决办法
- There is no Action mapped for namespace [/] and action name [login] associate解决办法 .
- There is no Action mapped for namespace [/] and action name [login] associate解决办法 .
- ssh web项目出现错误There is no Action mapped for namespace [/] and action name [login] associate解决办法
- struts2 - There is no Action mapped for namespace [/login] and action name [login!loginInput] ...
- There is no Action mapped for namespace / and action name login.的解决
- 彻底解决STRUTS2 错误There is no Action mapped for namespace / and action name login
- There is no Action mapped for namespace [/] and action name [Login] associated with context path [/e
- There is no Action mapped for namespace [/] and action name [login] associat...问题的另一个思路
- There is no Action mapped for namespace [/] and action name [login] associated with context path [/M
- There is no Action mapped for namespace [/] and action name [Login] associated wi
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [login!welcome] associ
- MyEclipse Struts2 There is no Action mapped for namespace [/] and action name [Login]
- There is no Action mapped for namespace / and action name login.
- There is no Action mapped for namespace / and action name login. - [unknown location]
- There is no Action mapped for namespace [/] and action name [login] associated with context path [/p
- IDEA配置Struts2出现There is no Action mapped for namespace [/] and action name [login]
- message There is no Action mapped for namespace [/] and action name [login] associated with context
- 回调函数定义和使用
- HDU1237
- c++之获取当前时间
- linux指令大全(完整篇)
- An overview of the ARM architecture
- There is no Action mapped for namespace [/] and action name [login] associate解决办法
- 管与android软键盘隐藏总结
- java > Eclipse,svn】解决Eclipse中SVN图标不显示的问题
- tomcat日志设置
- gethostbyname() -- 用域名或主机名获取IP地
- 【集合】TreeSet类
- Java中substring方法的使用
- linux服务器的搭建与配置
- 如何更改访问局域网共享用户名和密码