struts2 搭建环境后出现 no action mapped for namespace 的解决方法
来源:互联网 发布:label mx标签打印软件 编辑:程序博客网 时间:2024/06/09 22:06
在调试一个基础的Struts2框架小程序。总是提示"There is no Action mapped for namespace / and action name"的错误。上网查询后发现这是一个初学者经常碰到的问题,导致错误的原因主要有两种。总结如下:
一、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 搭建环境后出现 no action mapped for namespace 的解决方法
- Struts2错误:There is no Action mapped for namespace... 解决方法
- 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问题的解决方法——DMI未开启
- Struts应用出现的错误及解决方法:There is no Action mapped for namespace / and action name login
- 使用Struts2时出现There is no Action mapped for namespace / and action name .
- IDEA配置Struts2出现There is no Action mapped for namespace [/] and action name [login]
- struts2中出现There is no Action mapped for namespace / and action name .
- eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name...
- 初学struts2 出现There is no Action mapped for namespace...错误
- struts2的异常There is no Action mapped for namespace / and action name --转
- J2EE Struts2关于"There is no Action mapped for namespace / and action name UserAction"的调试
- 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"的总结
- java类重写equals和hashCode方法
- mysql根据条件做特定的更新
- 文本相似度-词袋模型
- Sublime Text 3 快捷键总结
- 布局
- struts2 搭建环境后出现 no action mapped for namespace 的解决方法
- 浅谈Java中的equals和==
- Struts2学习笔记(4)-ActionSupport类及Action接口详解
- Word2003入门动画教程46:用“碎片”复制或移动文章
- 一篇讲组播MAC和各类IP地址的文章
- 并发编程工具之三:Semaphore 用法及源码分析
- BASE理论。
- python上传字符和二进制的文件到PHP服务器
- 通信网络