果断收藏了,说的非常具体。刚開始学习的人常常遇到的问题。

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

在网上找了好久才找解到的方法,事实上是由于我的struts.xml文件放错了位置,server没有载入上导制。

之后将struts.xml文件移到src文件夹下就能够了。

将自己在网上的搜到的解决方式贴在这里供网友们以后解决这个问题的时候參考。

可能的原因:

1.-----首先查看你的struts.xml 文件是否在src文件夹下;

2.-----检查struts.xml文件的语法是否正确: 假设1正确的话那就一定是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="struts2" extends="struts-default">



<action name="login" class="com.test.action.LoginAction">

<result name="success">/result.jsp</result>

</action>

</package>

</struts>

那么就仅仅有是红字的部分写错了 查看你的是否吧struts-default中间的“-”错写成了struts=default;



二.确定名称是 struts.xml

三.粗心,细致检查配置文件,和excute方法的代码

来源:http://www.verydemo.com/demo_c140_i44529.html

There is no Action mapped for namespace / and action name UserAction的更多相关文章

  1. struts2中错误There is no Action mapped for namespace [/] and action name [] associated with context path

    1 There is no Action mapped for namespace [/] and action name [] associated with context path [/Stru ...

  2. Struts2中关于"There is no Action mapped for namespace / and action name"的总结

    今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误. ...

  3. 报错:HTTP Status 404 - There is no Action mapped for namespace [/] and action name [product-save] associated with context path [/20161101-struts2-2].

    运行:index.jsp---->input.jsp----->details.jsp,但是在input.jsp到details.jsp的时候报错误. 异常如下: 严重: Could no ...

  4. Struts2-tomcat报错:There is no Action mapped for namespace / and action

    HTTP Status 404 - There is no Action mapped for namespace / and action name first. type Status repor ...

  5. There is no Action mapped for namespace [/pages/action/student] and action name [findStudent]

    1.错误描写叙述 2014-7-13 2:38:54 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one ...

  6. eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name [Login] associated wi

    下午在eclipse中配置struts2时报: There is no Action mapped for namespace [/] and action name [Login] associat ...

  7. eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误

    eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with conte ...

  8. struts 2.5 There is no Action mapped for namespace [/] and action name [user_find] associated with context path [/struts2_crm].

    遇到了这个错误. There is no Action mapped for namespace [/] and action name [user_find] associated with con ...

  9. Could not find action or result: There is no Action mapped for namespace [/] and action name [GetG

    Could not find action or result: /car/GetGpsDataAction  There is no Action mapped for namespace [/] ...

随机推荐

  1. shakes hands

    Description On February, 30th n students came in the Center for Training Olympiad Programmers (CTOP) ...

  2. 使用SetLocaleInfo设置时间后必须调用广播WM_SETTINGCHANGE,通知其他程序格式已经更改

    uses messages; Procedure SetDateFormat; //设置系统日期格式var buf:pchar; i:integer; p:DWORD;begin getmem(buf ...

  3. io 测试

    //其中能够实现编码的只有OutputStreamWriter和对应inputStreamReader package net; import java.io.BufferedWriter; impo ...

  4. [积累]C++复习 海大2014硕士生面试题微信系统总结

    好久没用C++了,正好同学有个面试题,于是就帮忙看了一下.尽管对C++的知识了解不少, 可是长期被Java浸淫, 发现这个简单的程序却也写着也不是那么顺手.好在最后还是搞定了,以下分析一下,题目例如以 ...

  5. hdu3072

    Intelligence System Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe ...

  6. XenCenter注册码一年申请

    http://deliver.citrix.com/go/citrix/xenserver_activation?transactionID=2f65d2f134bf485d871291a566d67 ...

  7. Android菜鸟的成长笔记(5)——Android系统源代码你下载了吗?

    原文:Android菜鸟的成长笔记(5)--Android系统源代码你下载了吗? 在上一篇中我们用Android系统源代码分析了我们前面写的代码,有的朋友可能就会问怎么才能下载到Google官方的源代 ...

  8. io端口

    io端口 ***********************************************************   io端口设备访问流程为 --------------------- ...

  9. Swift - 给表格添加编辑功能(删除,插入)

    1,下面的样例是给表格UITableView添加编辑功能: (1)给表格添加长按功能,长按后表格进入编辑状态 (2)在编辑状态下,第一个分组处于删除状态,第二个分组处于插入状态 (3)点击删除图标,删 ...

  10. Jetty开发指导:HTTP Client

    介绍 Jetty HTTP client模块提供易用的API.工具类和一个高性能.异步的实现来运行HTTP和HTTPS请求. Jetty HTTP client模块要求Java版本号1.7或者更高,J ...