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 ...
随机推荐
- lyf基础作业
include <stdio.h> include <stdlib.h> int main (void) { FILE * fp; int a[10]; int max=0; ...
- beta week 1/2 Scrum立会报告+燃尽图 03
本次作业要求参见:edu.cnblogs.com/campus/nenu/2019fall/homework/9913 一.小组情况组长:贺敬文组员:彭思雨 王志文 位军营 徐丽君队名:胜利点 二.S ...
- 使用FFmpeg让mp4转gif
配好环境之后,需要在开始菜单中打开命令提示符,然后进入到test.mp4的文件目录下执行命令.(直接在文件目录下打开cmd不能生效)ffmpeg -i test.mp4 -f gif test.gif
- echarts+json笔记
echart_test.html <!DOCTYPE html> <head> <meta charset="utf-8"> <scrip ...
- ajax 调用 webService
前台脚本<script type="text/javascript"> $(function () { $.ajax({ type: "POST", ...
- 【数据算法】Java实现二叉树存储以及遍历
二叉树在java中我们使用数组的形式保存原数据,这个数组作为二叉树的数据来源,后续对数组中的数据进行节点化操作. 步骤就是原数据:数组 节点化数据:定义 Node节点对象 存储节点对象:通过Linke ...
- laravel 发送html邮件是a标签中的url不显示问题
- [论文理解] Attentional Pooling for Action Recognition
Attentional Pooling for Action Recognition 简介 这是一篇NIPS的文章,文章亮点是对池化进行矩阵表示,使用二阶池的矩阵表示,并将权重矩阵进行低秩分解,从而使 ...
- leetcode-easy-string-7 Reverse Integer
mycode class Solution(object): def reverse(self, x): """ :type x: int :rtype: int &qu ...
- 全面解读php-网络协议
一.OSI七层模型 1.物理层 作用:建立,维护,断开物理连接 2.数据链路层 作用:建立逻辑连接,进行硬件地址寻址,差错校验等功能. 3.网络层 作用:进行逻辑地址寻址,实现不同网络之间的路径选择. ...