Web项目采用SSH架构,偶尔报“There is no Action mapped for namespace / and action name login.”异常。
从字面上得信息来看,是找不到action的映射,出现这个错误是struts2报的错,主要有几方面原因:
1.访问的地址错误,这种情况没什么可说的,仔细检查一下就行
2.命名空间错误(namespace),如果action有命名空间的话,访问的时候需要拼接上,如namespace='user'、<action name="login">,访问应该用:\user\login.action
3.struts.xml文件未被读取,有可能是文件名不对,也有可能是文件的引用地址不对
4.MyEclipse的bug,这个问题是最恶心的,如果以上问题都不是,那么最有可能的就是这个错了。这个错是怎么回事呢,主要是MyEclipse在发布到Tomcat上得时候没发布struts.xml,手动将struts.xml粘贴到项目的classes文件夹里就好了 - -!
发表评论
-
Linux下web项目中File地址错误问题
2014-07-21 12:42 652String path = servletContext.g ... -
Spring MVC 表单提交 405
2014-05-05 10:17 1068Spring MVC post表单提交后返回页面报错:405 ... -
HttpSession清空
2014-04-30 13:41 1040// 销毁session session.invalid ... -
java.io.InvalidClassException异常处理
2013-07-16 16:27 16401java.io.InvalidClassException ... -
发布应用后出现问题的处理思路
2012-07-05 12:11 805发布后的应用,源码都被打成了jar包,无法进行debug,如果 ... -
net.sf.cglib.core.CodeGenerationException: 异常处理
2012-06-12 14:36 0做流程引用了JBPM3的包,在发布的时候经常会报一个异常: ... -
struts2 重定向、动态跳转
2012-04-24 21:26 1537struts.xml: <action name ... -
MyEclipse下有main函数类运行报错:Editor does not contain a main type
2012-03-31 10:59 5065出现这种问题的原因是,该java文件所在的包没有被MyEcl ... -
apache.commons.lang2.3学习笔记-CharEncoding
2011-12-06 21:40 935public class TestCharEncodin ... -
apache.commons.lang2.3学习笔记-ChartSetUtils
2011-12-06 21:29 1098public class TestChartSetUti ... -
apache.commons.lang2.3学习笔记-BooleanUtils
2011-12-06 21:28 1383public class TestBooleanUtil ... -
apache.commons.lang2.3学习笔记-ArrayUtils
2011-12-06 03:18 2235public class Lang { class B ... -
【转】使用Swing皮肤机制 更换皮肤
2011-09-30 08:43 1886转自:http://tech.ddvip.c ... -
【转】Date类学习总结(Calendar Date 字符串 相互转换 格式化)
2011-08-18 20:09 862Date类学习总结 1.计算某一月份的最大天数 Ca ... -
BigDecimal设置精度
2011-06-17 09:16 12816public BigDecimal setScale ... -
DecimalFormat用法 数字类型文本格式转化
2011-05-18 22:38 2336//String custom="#,###,00& ... -
【转】Java中颜色的String和Color对象之间的互相转换
2011-05-06 13:18 2545package org.signsmile; impor ... -
@incolue org.apache.jasper.JasperException处理
2011-05-05 13:15 900在jsp中 使用include 可能发生以下异常: org. ... -
org.apache.commons.collections.MultiMap 使用范例
2011-04-23 09:15 1756MultiMap map = new MultiValueM ... -
JAVA数字格式化
2011-04-22 09:44 846java.text.DecimalFormat df = ne ...
相关推荐
前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, ...
HTTP Status 404 - There is no Action mapped for namespace and action name BackMemberGroupAudit..doc
该文档对weblogic使用过程中,包括下载,安装,部署...6. weblogic部署war包action不能访问问题解决方法 [There is no Action mapped for namespace / and action name]. 5 7. java.lang.StackOverflowError. 5 等等
http://localhost:8080/ struts2会拦截,出现异常信息 There is no Action mapped for namespace / and action name.默认配置的welcomefile没有起作用。 按附件配置即可解决此问题
在网上找了好个struts2的例子结果都不好使报There is no Action mapped for namespace / and action name这个错,没办法自己搞了个好用的,myeclipse 6.0 +tomcat5.5 + jdk 1.5 引入项目后直接发布就可以了!
利用业余时间,写了个貌似windows自带的任务管理器(私下认为其功能更甚windows自带的)。 封装了许多API接口成为类(一些源自网络,一些自己封装),方便C++使用。但是对整个代码的设计比较烂,打算在学完设计模式...
What is finalize() for? ............. 120 You must perform cleanup ......... 121 The termination condition ......... 121 How a garbage collector works .. 122 Member initialization ......... 125 ...
has not been well mapped. This book is about FOSS for Development (FOSS4D). We will focus on the Least Developed Countries (LDC's) and primarily on the African context. Most of the LDC's are in Africa...
3. There is a point light and a single directional light in the scene. 4. There is one rotating triangle floating in the air, casting a shadow on the table, walls and other objects. 5. The program ...
To reserve or commit memory and unintentionally not release it when it is no longer being used. A process can leak resources such as process memory, pool memory, user and GDI objects, handles, threads...
17)..Added: Support for relative file paths and environment variables for events and various module paths 18)..Added: Logging in Manage tool 19)..Added: Windows 10 version detection 20)..Added: Stack ...
Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...
Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...
Returns the servlet container attribute with the given name, or null if there is no attribute by that name. getAttribute(String) - Method in class javax.servlet.ServletRequestWrapper The default ...
Chapter 2 Rendering and Animation Techniques for 3D Polygons ......39 Vertex Animation and 3D Morphing ................................39 Sample Program: morph3d....................................40 ...
1 The Nature of Hardware and Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Introducing Hardware/Software Codesign .. . . . . . . . . . . . . . . . . . . . . . ...
is larger than the largest known FADT version, and 2) if there is a mismatch between a 32-bit block address and the 64-bit X counterpart (when both are non-zero.) Example Code and Data Size: These ...
2.4.4 Developing Kernel Applications for VSB Systems ..................................... 21 2.5 VxWorks Without Networking ..............................................................................
基于.NET4.0的MemoryMappedFile实现共享内存通信 共享内存通信可以解决跨线程、跨进程、跨EXE之间通信的问题 对于需要传输图片等引用类数据,可以通过序列化和反序列化配合共享内存实现跨进程(跨EXE)通信 共享...
2.1.5 Create an Instance of the Mapped Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.6 Creating a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....