`

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

阅读更多
出现这种错误是因为配置文件没找到,检查一下你的struts.xml是否在classes 文件夹下

查看你的struts.xml这个文件名称是否与“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">

extends="struts-default"

如果没用<s:form>的话 形式应该是这样:<form  action="strut/login.action" >  
如 果你用的是<s:form >形式 那应该是:<s:form name ="form1" action ="login" namespace="/strut">

 

form 标签  没有namespace属性
s:form 标签  有namespace属性

一般不用重新启动tomcat就可以成功了


分享到:
评论

相关推荐

    一个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

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

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

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

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

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

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

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

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

    Working with the NameSpace Object Working with the MAPIFolder Object Working with the Items Collection Properties and Methods Common to Outlook Items Outlook Issues Conclusion...

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

    Working with the NameSpace Object Working with the MAPIFolder Object Working with the Items Collection Properties and Methods Common to Outlook Items Outlook Issues Conclusion...

    微软内部资料-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 ...

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

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

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

    vxworks_kernel_programmers_guide_6.9

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

    vim-master.zip

    This editor is very useful for editing programs and other plain text files. All commands are given with normal keyboard characters, so those who can type with ten fingers can work very fast. ...

    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