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本身并没有写错的情况下,那么发生错误有可能是路径,配置文件名. 如果实在找 ...
随机推荐
- 【转载】Java枚举的使用
枚举类型可以取代以往常量的定义方式,即将常量封装在类或接口中.此外,枚举类型还提供了安全检查功能.枚举类型本质上还是以类的形式存在. 1.使用枚举类型设置常量以往设置常量,通常将常量放置在接口中,这样 ...
- WebSocket协议探究(三):MQTT子协议
一 复习和目标 1 复习 Nodejs实现WebSocket服务器 Netty实现WebSocket服务器(附带了源码分析) Js api实现WebSocket客户端 注:Nodejs使用的Socke ...
- 题解 P3378 【【模板】堆】
Update 18.2.27----想当年我还用着C..... 看到题解里一堆用C++ STL库中的优先队列,身为C语言选手心里不是滋味 故手打一个优先队列献给坚守在C语言的选手 #include & ...
- 校验用户名是否存在(ajax+jackson)
只是简单的仿某度注册的用户名输入离焦后检验 目录结构 没有涉及到数据库 html <!DOCTYPE html> <html lang="en"> < ...
- openmp 和 thread 性能实测
#include <stdio.h> #include <iostream> #include <thread> #include<omp.h> //# ...
- SVN 问题解决之 The XML response contains invalid XML
公司几个同事的SVN更新时出现了The XML response contains invalid XML报错 经Google得到一个线索,可能和Http请求有关. 想起之前项目改过一次网络请求方式, ...
- 安装window、linux双系统
一.安装windows,从主硬盘中分出40G空间: 二.下载linux ios镜像; 三.安装UltraISO,把下载好的linux镜像写入u盘: ‘写入硬盘镜像’->写入方式‘usb-HDD+ ...
- C++线程同步之原子操作
所谓的原子操作就是指一个线程对于某一个资源做操作的时候能够保证没有其它的线程能够对此资源进行访问. 原子操作仅仅能够解决某一个变量的问题,只能使得一个整型数据做简单算术运算的时候是原子的. 以下案例需 ...
- 03 WIndows编程——手绘函数调用过程
源码 #include<Windows.h> #include<stdio.h> int MessageBoxPrint(char *szFormat, ...); int W ...
- Maven 发布项目到Jetty服务器———5
官网: http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html 1.安装配置插件 2. 运行 命令: je ...