There is no Action mapped for namespace [/] and action name [Login] associated

使用struts2时出现了:

There is no Action mapped for namespace [/] and action name [Login] associated

两个可能的错误:

1.struts.xml大小等写错,或者不是放在src目录下。

解决方法:项目右键 -》properties -》Java Build Path -》source -》,要放在webRoot/WEB-INF目录下

2.可能是使用了通配符来配置。

struts2.5后,使用通配符的方式实现动态方法调用要在
<action name="action_*" class="personList" method="{1}">
<allowed-methods>add,addUI,list</allowed-methods>
</action> 
action加入<allow-methods>方法名(可多个)</allowmethods>
这个配置项.

时间: 2024-08-03 11:02:19

There is no Action mapped for namespace [/] and action name [Login] associated的相关文章

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 not find action or result/There is no Action mapped for namespace [/] and action name [] associated with context path []. - [unknown location]at com.opensymp

关于Struts2中的错误:例如There is no Action mapped for namespace / and action name product-input.

            在配置struts.xml 文件时,会出现    There is no Action mapped for namespace / and action name ....    意思是没有product-input的映射文件或者是命名空间       出现这样的错误的原因后:     做如下检查:           1: 把struts.xml中的namespace="/"改成namespace=""或者去除,使用默认的命名空间. 2:

There is no Action mapped for namespace / and action name 通配符的问题

之前看了一些struts2的视频. 现在复习了下 struts2.发现了这个问题 网上的说的解决办法大都没提到这个问题,1%的文章提到了新版本的struts中 method的问题 There is no Action mapped for namespace / and action name XXX http://localhost:8080/Struts2Learn/loginAction_login.action 原因不详. 解决办法: 通配符  *  的使用方法中. struts-2.5

There is no Action mapped for namespace [/] and action name [Login] associated with context path [/e

近期学习web开发时,就遇到这个令人头疼的问题. 百度谷歌了N遍,最终在博客http://blog.csdn.net/liu578182160/article/details/17266879中找到了问题的根源. 开发环境:win7 32位旗舰版,jdk1.7_45,jre7,eclipse4.3.1 JavaEE版,tomcat 7.0.42,struts2.3.16.3 问题出如今web.xml配置 原web.xml: <?xml version="1.0" encoding

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 [/Struts2_0300_Action2]. - [unknown location] 2 at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185) 3 at org.apache.struts2.i

struts2 : There is no Action mapped for namespace / and action name

2015.07.13 晚 学习搭建SSI 框架,用到struts2 ,启动后访问指定login.action报错 There is no Action mapped for namespace / and action name 查找原因,struts.xml 没有被找到. 解决方法 1 : 在web.xml中指定struts.xml 的位置 解决方法 2 : 将struts.xml 放在src根目录下,web.xml中不需配置struts.xml的地址. 总结 ,对框架各配置文件之间作用不了解

HTTP Status 404 - There is no Action mapped for namespace [/] and action name [Action!Method]错误解决

按照书本上的Struts2的例子,运行会出现错误: HTTP Status 404 - There is no Action mapped for namespace [/] and action name [sayHelloAction!sayStruts2] ... 貌似在struts.xml中配置action的method不会出错,而直接在jsp中写“Action!Method.action”就会报错. 搜索许久没有发现解决办法,后来发现第二种写法叫做“DMI”,会产生安全隐患,在stru

There is no Action mapped for namespace [/] and action name [LoginAction_home] associ

使用struts2框架产生的问题: index.jsp: <%@ page language="java" contentType="text/html; charset=UTF-8"%> <jsp:forward page="/login/login.jsp"></jsp:forward> login.jsp: <%@ page language="java" pageEncodin

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

好久没用Struts了,今天练了一个简单的应用,出现了一些意外的问题,由于这种原因一直报404 首先我的目录结构是这样子滴 web.xml中是这样配置的 <web-app> <display-name>Archetype Created Web Application</display-name> <filter> <filter-name>struts2</filter-name> <filter-class>org.a

There is no Action mapped for namespace [/] and action name [] associated with context path [/ch_05_ActionAnnotation]. - [unknown location]

There is no Action mapped for namespace [/] and action name [] associated with context path [/ch_05_ActionAnnotation]. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185) at org.apache.struts2.impl.