`

HTTP404 There is no Action mapped for namespace / and action name login.

 
阅读更多

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文件夹里就好了 - -!


分享到:
评论

相关推荐

    一个struts2的例子:彻底解决STRUTS2 错误There is no Action mapped for namespace / and action name login

    前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, ...

    HTTP Status 404 - There is no Action

    HTTP Status 404 - There is no Action mapped for namespace and action name BackMemberGroupAudit..doc

    weblogic安装部署以及常见问题解决

    该文档对weblogic使用过程中,包括下载,安装,部署...6. weblogic部署war包action不能访问问题解决方法 [There is no Action mapped for namespace / and action name]. 5 7. java.lang.StackOverflowError. 5 等等

    解决使用struts2 时 访问web工程首页问题

    http://localhost:8080/ struts2会拦截,出现异常信息 There is no Action mapped for namespace / and action name.默认配置的welcomefile没有起作用。 按附件配置即可解决此问题

    struts2 HelloWord例字

    在网上找了好个struts2的例子结果都不好使报There is no Action mapped for namespace / and action name这个错,没办法自己搞了个好用的,myeclipse 6.0 +tomcat5.5 + jdk 1.5 引入项目后直接发布就可以了!

    TaskManager

    利用业余时间,写了个貌似windows自带的任务管理器(私下认为其功能更甚windows自带的)。 封装了许多API接口成为类(一些源自网络,一些自己封装),方便C++使用。但是对整个代码的设计比较烂,打算在学完设计模式...

    Thinking in Java 4th Edition

    What is finalize() for? ............. 120 You must perform cleanup ......... 121 The termination condition ......... 121 How a garbage collector works .. 122 Member initialization ......... 125 ...

    free_and_open_source_software_for_development.pdf

    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...

    Simulating planar reflection using two-pass rendering and texture mapping

    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 ...

    微软内部资料-SQL性能优化2

    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...

    EurekaLog_7.5.0.0_Enterprise

    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 ...

    Visual.Studio.Tools.for.Office.Using.C.Sharp.with.Excel.Word.Outlook.and.InfoPath.Sep.2005

    Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...

    Visual.Studio.Tools.for.Office.Using.C.Sharp.with.Excel.Word.Outlook.and.InfoPath.Sep.2005.part2

    Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...

    servlet2.4doc

    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 ...

    Advanced Linux 3D graphics programming

    Chapter 2 Rendering and Animation Techniques for 3D Polygons ......39 Vertex Animation and 3D Morphing ................................39 Sample Program: morph3d....................................40 ...

    A pracitcal introduction to hardware software codesign

    1 The Nature of Hardware and Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Introducing Hardware/Software Codesign .. . . . . . . . . . . . . . . . . . . . . . ...

    acpi控制笔记本风扇转速

    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 ...

    vxworks_kernel_programmers_guide_6.9

    2.4.4 Developing Kernel Applications for VSB Systems ..................................... 21 2.5 VxWorks Without Networking ..............................................................................

    .NET4利用MemoryMappedFile实现跨进程多个可执行程序之间的通信

    基于.NET4.0的MemoryMappedFile实现共享内存通信 共享内存通信可以解决跨线程、跨进程、跨EXE之间通信的问题 对于需要传输图片等引用类数据,可以通过序列化和反序列化配合共享内存实现跨进程(跨EXE)通信 共享...

    SQLAlchemy Documentation

    2.1.5 Create an Instance of the Mapped Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.6 Creating a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

Global site tag (gtag.js) - Google Analytics