Struts2 项目报错 No result defined for action com.xxx.xxAction and result input
来源:互联网 发布:骑马与砍杀领主数据 编辑:程序博客网 时间:2024/05/17 06:59
1、问题描述
在界面表单中输入数据,跳转后页面报错。
错误信息类似下面这样:
Struts has detected an unhandled exception:Messages:No result defined for action com.form.user.action.LoginAction and result input<package name="user" namespace="/user" extends="struts-default"><action name="user_test" class="com.form.user.action.LoginAction"> <result>/jsp/home.jsp</result></action>
请注意:
No result defined for action com.form.user.action.LoginAction and result input这一条错误信息。
或许你也和我一样,认为这是由于struts的配置文件或者类路径等错误或者找不到所引起的。
其实并非如此,这是由于表单页面的输入或者拼写等错误引起的,这里的【input】是struts在验证传送到action中的参数发现不正确,自动返回的result。
而我们并没有在struts的配置文件中定义<result name=“input"></result>,所以引发了如上的错误信息。
2、解决方案
a. 在strust的配置文件中配置<result name="input">页面</result> , 用于提示。
b. 仔细检查表单的输入
0 0
- Struts2 项目报错 No result defined for action com.xxx.xxAction and result input
- Struts2:No result defined for action XXX and result input
- 报错:No result defined for action and result input
- SSH报错:No result defined for action com.tyzy.action.user.UserAction and result input
- struts2报错: No result defined for action and result input
- 关于struts2上传文件报错“No result defined for action and result input”
- 关于struts2上传文件报错“No result defined for action and result input”
- 使用struts2的标签报错No result defined for action and result input
- Struts2报错:No result defined for *action and result input
- No result defined for action XXX and result input
- No result defined for action XXX and result input
- struts2 拦截器报错:No result defined for action xxx.action and result input
- struts2 No result defined for action.....and result input
- [SSH]Struts2 -- No result defined for action and result input
- struts2 no result defined for action xxxx and result input
- No result defined for action com.xxx.xxxxx and result input
- Struts2疑难--No result defined for action com.marry.action.HqsyAction and result input
- struts2 在拦截器里报错:No result defined for action com.gkwl.action.UserAction and result input
- HALL定理
- QTP中插入数据库检查点举例
- UDI Tegra K1 SOC安卓游戏开发板测评
- android 解决 广播接收者监听网络变化会受到两次广播
- 547A . Mike and Frog(codeforces Round 305)
- Struts2 项目报错 No result defined for action com.xxx.xxAction and result input
- opencv学习笔记6:轮廓
- mysql基础理论之存储引擎概念
- Oracle问题
- xmpp的一些常识
- 判断URL是否合法
- Word Search
- 即时通讯之路——技术选型
- 12.非线性转换