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本身并没有写错的情况下,那么发生错误有可能是路径,配置文件名. 如果实在找 ...
随机推荐
- C# Unix时间戳和DateTime类型相互转换
/// <summary> /// 将Unix时间戳转换为DateTime类型时间 /// </summary> /// <param name="d" ...
- spring cloud Eureka 配置信息
Eureka instance 一个服务,如:订单系统,会部署多台服务器,而每台服务器上提供的服务就是instance; 负载配置. Eureka service 指的是服务,提供一种特定功能的服务, ...
- Java Web-Filter and listener
Java Web-Filter and listener Filter:过滤器 概述 拦截请求,完成一些特殊的功能. 过滤器的作用: 一般用于完成通用的一些操作,例如登录验证(通过session来判断 ...
- Python多个装饰器的顺序 转载
3.使用两个装饰器当一个装饰器不够用的话,我们就可以用两个装饰器,当然理解起来也就更复杂了,当使用两个装饰器的话,首先将函数与内层装饰器结合然后在与外层装饰器相结合,要理解@语法的时候到底执行了什么, ...
- Centos6.5 自带的Python2.6.6 如何安装setuptools和pip
setuptools-36.7.1 [root@ ]# wget https://files.pythonhosted.org/packages/a9/23/720c7558ba6ad3e0f5ad0 ...
- Flutter——Expanded组件("可伸缩"组件)
Expanded组件可以结合Row和Column布局组件使用. Expanded组件的常用属性 属性 说明 flex 元素占整个父Row/Column的比例 child 子元素 import 'pac ...
- FreeRTOS任务基础概念
RTOS系统的核心就是任务管理: 任务的特性 在RTOS中每个任务都有自己的运行环境,不依赖于系统中其他的任务或者调度器,任何一个时间点只能有一个任务运行,具体运行哪个任务是由任务调度器来决定的,而任 ...
- less-important
!important关键字:会为所有混合带来的样式,添加!important 在css里面加上!important,是所有样式优先级最高的 在less里面什么场景会用important,在调试的时候 ...
- rugarch包与R语言中的garch族模型
来源:http://www.dataguru.cn/article-794-1.html rugarch包是R中用来拟合和检验garch模型的一个包.该包最早在http://rgarch.r-forg ...
- git ls-files 列出被修改或者被删除的文件
git ls-files 列出被修改或者被删除的文件 git ls-files -m -d