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设置如下:
<package name="p1" extends="struts-default" namespace="/"strict-method-invocation="false">
<!--配置全局的结果视图-->
<global-results>
<result name="login" type="redirect">/login.jsp</result>
</global-results>
<!--配置jsp页面的访问规则-->
<action name="page_*_*">
<!--1:第一个*,2:第二个*-->
<result name="success">/WEB-INF/pages/{1}/{2}.jsp</result>
</action>
<!--用户模块-->
<action name="userAction_*" class="com.gyf.bos.web.action.UserAction" method="{1}">
<result name="home">/WEB-INF/pages/common/index.jsp</result>
<result name="loginfailure">/login.jsp</result>
</action>
</package>
推荐设置:namespace="/"
提示:因为SSH项目已经有很多年头了,使用时要考虑到版本问题。
Struts2.5以上版本There is no Action mapped for namespace [/] and action name [userAction_login] 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 ...
- struts2方法无法映射问题:There is no Action mapped for namespace [/] and action name [m_hi] associated with context path []
使用struts的都知道,下面使用通配符定义的方式很常见,并且使用也很方便: <action name="Crud_*" class="example.Crud&q ...
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误. ...
- 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 ...
- 报错: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 no ...
- Struts2-tomcat报错:There is no Action mapped for namespace / and action
HTTP Status 404 - There is no Action mapped for namespace / and action name first. type Status repor ...
- There is no Action mapped for namespace [/pages/action/student] and action name [findStudent]
1.错误描写叙述 2014-7-13 2:38:54 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one ...
- There is no Action mapped for namespace / and action name UserAction
果断收藏了,说的非常具体.刚開始学习的人常常遇到的问题. There is no Action mapped for namespace / and action name UserAction 在网 ...
- Could not find action or result: There is no Action mapped for namespace [/] and action name [GetG
Could not find action or result: /car/GetGpsDataAction There is no Action mapped for namespace [/] ...
- eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误
eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with conte ...
随机推荐
- 第八周总结&实验报告六
总结:这周主要是学习异常的使用,已经怎么解决异常,总的来说学习的还是有点难度的,因为前面的知识还需要时间去弥补,这门课程还是要加油的学习! 这周主要所学: 一.异常 1.异常是导致程序中断运行的一种指 ...
- LeetCode 92. 反转链表 II(Reverse Linked List II)
题目描述 反转从位置 m 到 n 的链表.请使用一趟扫描完成反转. 说明: 1 ≤ m ≤ n ≤ 链表长度. 示例: 输入: 1->2->3->4->5->NULL, ...
- D5(太长了md没写完)
动态规划 三种常见实现方法 对于一个斐波那契数列,我们想要求第n项的值,就需要一项一项的递归来求 来看代码 f[o] = 0; f[1] = 1; for (int i = 2; i <= n; ...
- DVM 和 JVM 的区别?
a) dvm 执行的是.dex 文件,而 jvm 执行的是.class.Android 工程编译后的所有.class 字节码会被 dex 工具抽取到一个.dex 文件中.b) dvm 是基于寄存器的虚 ...
- jenkisn Pipeline的流水线发布,自动化部署
创建一个流水线job,这只是个简单的流水线发布教程,写的不好~
- Jenkins发布
右键查看图片显示全图
- 使用PowerShell远程连接WinServer
最近做一个项目后台,涉及到多台服务器,当程序更新的时候,由于用的是WinServer,无法像Linux使用SSH批量更新,用Windows的mstsc的远程一个一个连接又太麻烦了.查找了一下资料,发现 ...
- 2D轮播图
目录结构 index.html <!DOCTYPE html><html lang="en"><head> <meta charset=& ...
- 【Qt开发】qt中涉及到空格包含路径的解决办法
qt中涉及到空格路径,qmake是无法正确编译的. 需要在空格路径前面加上$$quote INCLUDEPATH += $$quote(C:/Program Files/MySQL/MySQL Ser ...
- lambda得用法