Struts2中关于"There is no Action mapped for namespace / and action name"的总结
来源:互联网 发布:mysql下载32位 win7 编辑:程序博客网 时间:2024/06/05 04:45
from:http://www.cnblogs.com/gulvzhe/archive/2011/11/21/2256632.html
报错:
一、struts.xml文件错误。这种错误又分为以下几种:
1,struts.xml文件名错误。一定要注意拼写问题;
2,struts.xml文件放置路径错误。一定要将此文件放置在src目录下。编译成功后,要确认是否编译到classes目录 中;
3,struts.xml文件内容错误。下面给出一个正确的struts.xml文件以供参考。注意背景色部分。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" namespace="/" extends="struts-default">
<action name="login" class="com.wanggc.struts2.sample.Struts2Action">
<result name="success">/jsp/result.jsp</result>
</action>
</package>
</struts>
二、如果排除了struts.xml文件的问题,还有一种可能就是,在web.xml文件中的<welcome-file>信息中是否配置了自己工程的启动页面。如果没有配置,地址栏中要输入完整的url,如:http://localhost:8080/Struts2Sample/jsp/login.jsp,后面的资源详细信息不输入的时候也会报这个错误。
我是错在第二个原因上。
0 0
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- 第六天 Android学习总结(Activity)
- JQuery表单提交与后台交互
- android+mvp+retrofit+rxjava+okhttp的demo支持加载对话框消失取消请求
- ExtJS学习笔记(九) Layout
- 众人所知,去广告神器:天行广告防火墙!
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- kafka一之配置文件说明
- matlab 字符串处理函数
- [00312]基本的日期与时间转换
- js checkbox选取
- 密码输入框内禁止记住密码导致的自动填充
- awt--布局管理器的BoxLayout
- 使用C++实现快速排序QuickSort
- Repeater全选操作