struts.xml不在默认位置,导致出现HTTP Status 404 - There is no Action mapped for namespace [/] and action name [
来源:互联网 发布:mysql ifnull 编辑:程序博客网 时间:2024/04/29 20:39
使用maven构建的web项目没有将struts.xml放在resources根目录下,而是放在struts2/struts.xml中
结果运行出错
HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userAction_login] associated with context path [/MyWeb].
解决方法:手动指定配置文件的位置
在web.xml文件下修改struts2的filter
添加init-param
<init-param> <param-name>config</param-name> <param-value>struts-default.xml,struts-plugin.xml,struts2/struts.xml</param-value></init-param>
问题解决
注意仍然需要重新找struts-default.xml和struts-plugin.xml文件位置
当配置文件分开写比如上面的struts-user.xml文件,include时候写成相对路径也不能找到配置,需要在主配置文件struts.xml中使用
<include file="struts2/struts-user.xml"></include>加上文件夹
0 0
- struts.xml不在默认位置,导致出现HTTP Status 404 - There is no Action mapped for namespace [/] and action name [
- struts异常:HTTP Status 404 - There is no Action mapped for namespace [/] and action name [promotion]
- Struts 2.5.2 HTTP Status 404 - There is no Action mapped for namespace [/] and action name [regist_A
- 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
- 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
- web.xml文件出错导致了There is no Action mapped for namespace / and action name
- iOS学习资源(二)
- 15电气李丹【10个随机数求和】
- 任意10个数和方法三
- 虚幻4 材质基础
- (6)
- struts.xml不在默认位置,导致出现HTTP Status 404 - There is no Action mapped for namespace [/] and action name [
- MySQL与PostgreSQL的 SELECT FOR UPDATE
- Rman 备份参数 及 oracle 进程理论
- php生成excel的方法一
- 判断一个字符是否是中文
- android_design support library-Snackbar
- 五大常用算法:分治、动态规划、贪心、回溯、分支限界算法
- iOS - UITextFieldKeyBoardPan为时间选择器
- mybatis整合spring、springmvc时业务层无法进行事务回滚问题解决