struts2方法无法映射问题:There is no Action mapped for namespace [/] and action name [m_hi] associated with context path []
<action name="Crud_*" class="example.Crud" method="{1}">
最近更新struts版本到2.5.8时,发现无论怎么访问都无法启用通配符调用,一直在报如下错误:
There is no Action mapped for namespace [/] and action name [Crud_*] associated with context path [].
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<package name="default" extends="struts-default" strict-method-invocation="false"></package>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
2 并在struts.xml中开放方法访问:
方式一:全局配置
<package name="default" extends="struts-default">
<global-allowed-methods>regex:.*</global-allowed-methods>
</package>
<action name="login" method="login" class="loginAction">
<result name="login">/WEB-INF/login.jsp</result>
<allowed-methods>login</allowed-methods>
</action>
局限于技术和英语水平,建议结合官方文档看本博客.
参考资料:
struts2方法无法映射问题:There is no Action mapped for namespace [/] and action name [m_hi] associated with context path []的更多相关文章
- 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 ...
- 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 ...
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误. ...
- struts2报错:There is no Action mapped for namespace [/] and action name [userAction!add]
使用struts2.3进行动态方法调用时出现: There is no Action mapped for namespace [/user] and action name [user!add] a ...
- Struts2.5以上版本There is no Action mapped for namespace [/] and action name [userAction_login] associated with context path []
分析:Struts2在2.5版本后添加strict-method-invocation(严格方法访问),默认为true,不能使用动态方法调用功能,故需设为false struts.xml设置如下: & ...
- struts2中错误提示:There is no Action mapped for namespace / and action name
当在struts2中运行时出现如上所述错误时: 1.在src目录下创建struts.xml一定要注意拼写 2.struts.xml文件中引入和extend是否正确 3.在web.xml 中<we ...
- Struts2中There is no Action mapped for namespace错误解决方法
1.我的原有配置 jsp表单提交路径 <form class="layui-form" id="form" action="${ctx }/me ...
- Struts2中DMI(动态方法调用)的错误问题(There is no Action mapped for namespace [/xxx] and action name [xxx!yyy] a)
默认的Struts.xml中是这样的 <constant name="struts.enable.DynamicMethodInvocation" value="f ...
- struts2常见配置解决错误There is no mapped for namespace[/] and action name
我碰到这个错误的原因是我把配置文件名写成了Struts.xml,改成struts.xml就可以了. 在确定struts.xml本身并没有写错的情况下,那么发生错误有可能是路径,配置文件名. 如果实在找 ...
随机推荐
- Ubuntu 14.04 64位机上不带CUDA支持的Caffe
Caffe是一个高效的深度学习框架.它既可以在CPU上执行也可以在GPU上执行. 下面介绍在Ubuntu上不带CUDA的Caffe配置编译过程: 1. 安装BLAS:$ sudo apt-g ...
- tasklist、taskkill命令使用
tasklist.taskkill命令使用 在Windows XP中新增了两个命令行工具“tasklist.taskkill”.通过“Ctrl+Alt+Del”组合键,打开“任务管理器”就可以查看到本 ...
- Python练习_数据类型_day4
题目 1.作业 1,写代码,有如下列表,按照要求实现每一个功能 li = ["alex", "WuSir", "ritian", " ...
- 记一次Git提交报错的问题
通常代码版本控制的步骤是: 在代码版本控制平台新建一个仓库 clone远程仓库到本地 开始编码,然后是一系列add,commit,push 我的步骤是: 在远程代码版本管理平台新建一个仓库 在本地新建 ...
- 搭建nginx静态资源站
搭建静态资源站包括以下几部分: root指令与alias指令的区别 使用gzip压缩资源 如何访问指定目录下的全部资源文件 如何限制访问流量 如何自定义log日志 root指令与alias指令的区别 ...
- JS错误信息类型
1.SyntaxError 语法错误 ①变量名不规范 // 变量名不规范 var 1 = 1; 未被捕获的语法错误,这个错误是js机制自动抛出来的 意外的数字 // 下面两个是同一种情况 var 1a ...
- 一个SAP开发人员的养蚕流水帐
Jerry打算以此文来给汪子熙全家进行了一个多月的养蚕经历画上一个圆满的句号. 南方长大的80后,对蚕应该不会太陌生.大家还记得你们小时候学过的课文<蚕姑娘>么?课文开头是这样的: 春天天 ...
- PAT Advanced 1140 Look-and-say Sequence (20 分)
Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213 ...
- Java字节码方法表结构深度剖析
继续上一次[https://www.cnblogs.com/webor2006/p/9459681.html]的字节码分析,这次来分析一下最为复杂的方法表的信息,如下: 而上一次分析到了属性表的位置在 ...
- 问题 C: 如沫春风 ---有毒的gets(),新OJ不能用!用scanf(%s)读入即可!——ZZNU新OJ
问题 C: 如沫春风 时间限制: Sec 内存限制: MB 提交: 解决: [提交] [状态] [讨论版] [命题人:admin] 题目描述 月亮很亮,亮也没用,没用也亮. 我喜欢你,喜欢也没用,没用 ...