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本身并没有写错的情况下,那么发生错误有可能是路径,配置文件名. 如果实在找 ...
随机推荐
- Vs2019 C# .net core 将证书添加到受信任的根证书存储失败,出现以下错误:访问控制列表(ACL)结构无效
https://www.cnblogs.com/xiyuan/p/10632579.html 使用 vs2017 创建一个 ASP.NET Core Web 应用程序 -> Ctrl + F5 ...
- .net core +gogs + jenkins +docker自动化发布、部署
1.首先,安装docker,不多bb 2.我们采用docker的方式安装jenkins,同时将宿主机的docker挂载到docker安装的jenkins里面,可能有点拗口.说白了就是 就是要让jenk ...
- Spring的SSM标准配置
一.首先是web.xml文件的配置 <welcome-file-list> <!--设置默认显示登陆界面--> <welcome-file>login.jsp< ...
- Linux Centos7配置ftp服务器
一.安装 1.安装 yum install -y vsftpd 2.设置开机启动 systemctl enable vsftpd.service 3.启动 systemctl start vsftp ...
- perl自定义简易的面向对象的栈与队列类
perl中的数组其实已经具备了栈与队列的特点,下面是对数组经过一些封装的stack,queue对象 1.Stack类 创建一个Stack.pm文件 package Stack; sub new{ $s ...
- SAP UI5应用入口App.controller.js是如何被UI5框架加载的?
首先在UI5应用的manifes.json里,定义了UI5应用的入口视图为App: 调试器里的pending数组的两个元素: 实际上对应了我在App.controller.js里定义的两个依赖: 而a ...
- impala 中SQL的优化方法
1.取流水表的数据时,如果是使用全部分区数据,不能从SA层数据取数,需要改从SH层取数,因为SH层为parquet存储,查询性能较好. 2.对于脚本中使用的临时表,如果存在以下情况需要进行统计表信息 ...
- js判断img是否存在
利用image对象的onerror事件来判断,出错则更换image对象的src为默认图片的URL. <p>第一种情况:图片存在,正常显示 <img src="http ...
- 如何使用Metasploit进行汽车安全性测试
前言 针对汽车的攻击和入侵是当前最前沿的领域和最热门的话题之一.随着自动驾驶汽车技术的发展,在未来这个领域将变得更加重要.作为汽车黑客快速发展的一部分,我最喜欢的黑客工具之一Metasploit也开发 ...
- LVM——header