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 ...
随机推荐
- 3-23 Rspec自动化测试(开始练习)
闰年程序 leap_year_spec.rb require_relative './leap_year' describe "Leap Year" do it "201 ...
- 微信小程序------MD5加密(支持中文和不支持中文)和网络请求(get和post)
开发中常常遇到MD5加密,最近做小程序也用到了,简单总结了一下: 这要有两个加密文件,一个不支持中文,一个支持,所以你选择支持的来用就行了: 也随便说说小程序的get和post网络请求. 来看看效果图 ...
- php--------合并2个数字键数组的值
开发中遇到了,数组合并并去除重复这个功能,查阅资料, 找到了一个方法,分享一下. <?php /** * PHP合并2个数字键数组的值 * * @param array $arr1 * @par ...
- Windows Server2008安装mysql5.6出现程序无法正常启动(0xc000007b)
下载 到官网下载mysql5.6版本,msi安装包只有32位无64位 移动到指定文件夹下,解压文件 添加环境变量 变量名:MYSQL_HOME 变量值:C:\Program Files\mysql 即 ...
- antd-pro1.0使用jest对react组件进行单元测试
前言 基于React+Ant Design(以下用Antd表示)的项目,在对于自己封装的,或者基于Antd封装的公共组件的自动化测试技术的选型和实践. 背景 随着前端项目越来越大,业务逻辑日益繁杂,协 ...
- linux--多进程进行文件拷贝
学习IO的时候,我们都曾经利用文件IO函数,标准IO函数都实现了对文件的拷贝, 对某一个文件进行拷贝时,我们可以考虑一下几种方式: a.单进程拷贝: 假设某一文件需要拷贝100字节,每一个时间片可以完 ...
- UVA-1220 Party at Hali-Bula (树的最大独立集)
题目大意:数的最大独立集问题.特殊在要求回答答案是否唯一. 题目分析:定义状态dp(i,1),dp(i,0)分别表示以i为根节点的子树选不选i最多可选的人数,f(i,1),f(i,0)分别表示以i为根 ...
- python 小练习 11
桌子上有一堆数量不超过20的果子,每个果子的重量都是不超过20的正整数,全部记录在列表 L 里面.小明和小红决定平分它们,但是由于他们都太自私,没有人愿意对方比自己分得的总重量更多.而果子又不能切开, ...
- 使用iview-project 打包build报错,ERROR in xxxxx.cheunk.js from UglifyJs
一.iview-project 为iview官方推荐工程,一个基于iview的vue脚手架 github网址:https://github.com/iview/iview-project 废话不多说 ...
- linux command curl and sha256sum implement download verification package
example: download_etcher_cli(){ local url="https://github.com/resin-io/etcher/releases/download ...