No result defined for action com.nynt.action.ManageAction and result input问题
No result defined for action com.nynt.action.ManageAction and result input 问题原因:
1)、 在action类中定义的一个return "input";在xml文件里没有东西接收。
举例说明:
struts.xml 文件:
<package name="file" namespace="/file" extends="struts-default">
<action name="inputFile" class="action.FileAction" method="inputFile">
<result name="success">/index.jsp</result>
</action>
</package>
action类文件:
public String inputFile(){
System.out.println(hh);
return "input";
}
此时会报这样的异常
2)、struts拦截器无法将前台类型与后台类型匹配报出异常,此时进不了后台
举例说明:
jsp页面:
<form action="file/inputFile.action" method="post" enctype="multipart/form-data">
<input type="text" name="hh" value="aa"/>
<hr/>
<input type="submit" value="上传"/>
</form>
action类文件:
private int hh;
public String inputFile(){
System.out.println(hh);
return "success";
}
action 中 aa 为 int 类型有 setter 和g etter 方法,此时报出此异常
这是因为struts的拦截器没有办法将value里面的“aa”强制转化成int类型
假设jsp页面有两个<input type="text" value="bb" name="hh"/> name值同样
里面的类型都是能够强制转化成 int 的,可是struts的拦截器没有办法拼接
所以也会报出类型不匹配错误,即这个异常。
No result defined for action com.nynt.action.ManageAction and result input问题的更多相关文章
- No result defined for action com.lk.IndexAction and result success
意图访问一个 /es/index.action 竟然出现: [SAE ] ERROR [05-11 13:54:32] [http-80-5] com.opensymphony.xwork2.util ...
- no result defined for action
1.no result defined for action .......and result input 或者 no result defined for action .......and ...
- Struts 2.x No result defined for action 异常
这是我跑struts2的第一个例子,跑的也够郁闷的,这个问题烦了我几个钟... 2011-5-10 10:10:17 com.opensymphony.xwork2.util.logging.co ...
- HTTP Status 404 - No result defined for action com.hebky.oa.classEntity.action.EntitysAction and result input
在开发中总遇到这个问题,No result defined for action:原因:Action中的属性值为空的时候,Struts2的默认拦截器会报错,但是又找不到input的Result,不能够 ...
- Struts2问题,已解决No result defined for action and result input
struts2.1.8 必须在struts.xml中配置namespace属性 如果你在2.0中一切OK,但是在2.1中确出现了No result defined for action的异常,就是在因 ...
- validators配置要点及No result defined for action报错解决方案
在做JavaEE SSH项目时,接触到validators验证. 需要了解validators配置,或者遇到No result defined for action 这个错误时,可查阅本文得到有效解决 ...
- struts异常:No result defined for action
问题描述: No result defined for action com.freedom.funitureCityPSIMS.controller.login.CheckAction and re ...
- SSH配置struts校验发生No result defined for action actions.AdminLoginAction and result input
配置struts校验发生No result defined for action actions.AdminLoginAction and result input,但是登录,success.jsp, ...
- Messages: No result defined for action cn.itcast.oa.test.TestAction and result SUCCESS
Struts Problem Report Struts has detected an unhandled exception: Messages: No result defined for ac ...
随机推荐
- python-day65-django基础
一.MTV模型 1.官方说明: Django的MTV分别代表: Model(模型):负责业务对象与数据库的对象(ORM) Template(模版):负责如何把页面展示给用户 View(视图):负责业务 ...
- thinkphp数组处理
1.array_unique() 移除数组中的重复的值,并返回结果数组.当几个数组元素的值相等时,只保留第一个元素,其他的元素被删除,对每个值只保留第一个遇到的键名,接着忽略所有后面的键名.返回的数组 ...
- thinkphp if标签
1.thinkphp框架中的if标签,用于html页面中.在html中编写php代码 1).从控制器中得到数据在循环中if else 判断:<volist name="system_r ...
- 55. 45. Jump Game II *HARD*
1. Given an array of non-negative integers, you are initially positioned at the first index of the a ...
- String对象中的正则表达式
(1)身份证号码验证身份证号码是18位数字,根据GB11643-1999<公民身份证>定义制作:由17位本体码和一位校验码组成.身份证号码前6位是地址码,按(GB/T2260)规定执行.接 ...
- python执行系统命令后获取返回值
import os, subprocess # os.system('dir') #执行系统命令,没有获取返回值,windows下中文乱码 # result = os.popen('dir') #执行 ...
- Ubuntu中使用WPS
ubunu系统下用WPS办公软件比较好,比较兼容MS office, ubuntu下WPS相关命令有:et,wps,wpp. 使用Ctrl+Alt+T打开命令端, "et"命令可以 ...
- sql server中的go
1. 作用:向 SQL Server 实用工具发出一批 Transact-SQL 语句结束的信号.2. 语法:一批 Transact-SQL 语句GO如Select 1Select 2Select 3 ...
- 经典T-SQL代码
1. N到M条记录(要有主索引ID)SelectTop M-N *From [Table] Where ID in (SelectTop M ID From [Table]) Orderby ID ...
- apache的日志access_log分析
正常日志格式:客户端地址 访问者的标识 访问者的验证名字 请求的时间 请求类型 请求的HTTP代码 发送给客户端的字节数 当网站出问题时分析日志,第一步一般都不会是看访问日志.但是也不能忽视它,在 ...