There is no Action mapped for namespace [/user] and action name [user!add] associated with context p

使用struts2.3进行动态方法调用时出现:

There is no Action mapped for namespace [/user] and action name [user!add] associated with context path错误,原因是

(1)DMI可能导致安全问题

(2)DMI与通配符方法功能有重叠,因此该版本Struts2默认关闭DMI,需要在struts.xml中加一句

<constant name="struts.enable.DynamicMethodInvocation" value="true" /> 来打开动态方法调用。动态方法调用官方推荐的做法是,使用通配符的形式。不要使用actionName!methodName的方式。

本人尝试用方法2,问题解决!

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-08-09 02:18:49

There is no Action mapped for namespace [/user] and action name [user!add] associated with context p的相关文章

There is no Action mapped for namespace [/demo1] and action name [doLogin] associated with context path [/SSO_same_domain]

学习mooc视频时出现这个问题. 1. 需要使用gotoUrl这个变量来保存我们预访问的界面 login.jsp 视频中form表单的地址是没有写  ${pageContext.request.contextPath }   这一句的. 查看了一下地址栏的地址变化.发现是自己的jsp页面的action请求地址不能正确的访问,不写${pageContext.request.contextPath },浏览器地址直接跳到 http://localhost:8080/sso/ 但是tomcat中并没有

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