Struts1.3 HTTP Status 500 No action config found for the specified url
来源:互联网 发布:不喜欢令狐冲知乎 编辑:程序博客网 时间:2024/05/07 06:24
HTTP Status 500 - org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url
利用Struts1.3 MVC框架编写一个小例程,struts配置如下图所示:
项目的文件目录如下图所示:
入口jsp是person.jsp,为一个添加人员信息表单,对应的Form Bean 和Action是PersonForm和PersonAction,在personAction中进行分流,action为add时是person.jsp表单,action为list时列出所有的人员信息。addSuccess为添加成功后的页面,包含向list页面的跳转。代码如下:
<html:html lang="true"> <head> <html:base /> <title>addSuccess.jsp</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> This a struts page. <br> ${pageContext.request.contextPath }<br> 添加人员成功。<a href="person.do?action=list">返回人员列表</a> </body></html:html>打开浏览器进行测试,在addSuccess页面向list页面进行跳转时,出现如下错误,浏览器uri如下:查找原因:排除action的配置文件错误;那么就是跳转的路径问题。在地址栏输入:http://localhost:8080/Struts1MVCTest/form/person.do?action=list发现同样出现如下错误,去掉中间的/form路径之后能够显示出列表。
原因是:以person.do?action=list为路径直接访问的URL是http://localhost:8080/Struts1MVCTest/form/person.do?action=list,在/form下提交.do的话struts不会处理,需要在/Struts1MVCTest下提交.do文件。
因此需要将链接的路径修改为:<a href="${pageContext.request.contextPath }/person.do?action=list">返回人员列表</a>。这样就可以解决这个问题了。
0 0
- Struts1.3 HTTP Status 500 No action config found for the specified url
- InvalidPathException: No action config found for the specified url.
- InvalidPathException: No action config found for the specified url.
- Struts“No action config found for the specified url.”错误,解决
- No configuration found for the specified action
- No configuration found for the specified action:
- struts2: No configuration found for the specified action 找不到action
- No configuration found for the specified action: ''in namespace: '/'
- No configuration found for the specified action解决办法
- 解决:No configuration found for the specified action
- 彻底解决警告: No configuration found for the specified action
- struts2 标签 No configuration found for the specified action
- 解决:No configuration found for the specified action
- 警告: No configuration found for the specified action: 'PointAction'
- 解决:No configuration found for the specified action
- 解决:No configuration found for the specified action
- No configuration found for the specified action警告总结
- 解决:No configuration found for the specified action
- APNs(英文全称:Apple Push Notification service)Demo与实践
- sed的\(.....\)\(...\)/\n 这种型式的理解
- IOS调用相册显示英文解决方法
- 【Swift】ASIdentifierManager--广告标示代替唯一标示
- Hibernate配置各种数据源详解
- Struts1.3 HTTP Status 500 No action config found for the specified url
- 通过使用 L2TP/IPsec VPN 协议连接到 VPN Gate
- Keil(MDK-ARM)系列教程(六)_Configuration(Ⅱ)
- 科研的常见科研思路与论文描述方法
- Ajax的一些方法
- unity调用系统相册无法横屏解决方法(ios)
- Android防止快速重复点击
- Linux中大括号的用法扩展
- android运行时报错记