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

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. find-a-jar-file-given-the-class-name

    Save this as findclass.sh (or whatever), put it on your path and make it executable: #!/bin/sh find ...

  2. POJ 3619 Speed Reading(简单题)

    [题意简述]:有K头牛,N页书,每次第i头牛每分钟仅仅能读Si页书,连续读Ti分钟,之后歇息Ri分钟.如今问我们第i头牛花费多少时间能够读完这N页书. [分析]:简单的模拟 //220K 32Ms # ...

  3. Swift - 计算次方(2的N次方,2的随机次方)

    1,使用<<计算2的N次方 1 2 var value = 1<<4  //2的4次方 var value = 1<<Int(arc4random_uniform( ...

  4. 【读书笔记】《未来闪影》罗伯特·J·索耶

    真是一本引人入胜的书! 看了不到一半,就有一种置身其中的感觉,要是我也能看到自己二十年后的生活,哪怕只有1分43秒,该是一件多么奇妙的事情.但忧虑也随之而来,如果二十年后我没有成为现在想成为的人,现在 ...

  5. xcode6 cocos2dx开玩笑git和github学习记录

    1. git Xcode4开始,它一直Git作为一个内置的源代码控制(Source Control)工具,所以对于新项目的用途git要管理非常方便.在新建项目向导.可以直接选择Git作为源控制工具.项 ...

  6. ios html5 设定PhoneGap开发环境

    怎么样IOS平台搭建PhoneGap开发环境(PhoneGap2.5) (2013-03-13 14:44:51) 标签: c=blog&q=it&by=tag" targe ...

  7. gulp多张图片自动合成雪碧图

    相信做前端的同学都做过这样的事情,为优化图片,减少请求会把拿到切好的图标图片,通过ps(或者其他工具)把图片合并到一张图里面,再通过css定位把对于的样式写出来引用的html里面.对于一些图片较多的项 ...

  8. [C#基础] 泛型

    为什么泛型? 在泛型中,最重要的应用便是集合类,因此我们模拟一个简单的集合类 对于上述示例,可以有如下应用 从上可看出,自定义的代码太丑陋了,只能用于string类型. 当然我们可以用object作为 ...

  9. HDU 1548 A strange lift(Dijkstra,简单BFS)

    题目大意: 电梯有两个选项向上或向下,每层楼有一个参数ki,代表电梯可以再该楼层的基础上向上或向下移动ki层,限制条件是向上不能超过楼层总数n,向下不能少于一.输入总层数n和当前所在层数以及目标层数, ...

  10. niu人

    金步国简历 金步国简历 基本资料 姓名 金步国 性别 男 年龄 30 籍贯 江苏 淮安 院校 同济大学 专业 土木工程 学历 本科肄业 工作经验 5年 期望地点 长江以南 期望薪水 18000/月 个 ...