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 ...
随机推荐
- CF1083B The Fair Nut and String
题意 给出两个长度为n的01字符串S和T. 选出k个字典序在S和T之间的长度为n的01字符串,使得尽可能多的字符串满足其是所选字符串中至少一个串的前缀. 这是一道思路比较奇怪的类似计数dp的题. 首先 ...
- A Creative Cutout CodeForces - 933D (计数)
大意:给定$n$个圆, 圆心均在原点, 第$k$个圆半径为$\sqrt{k}$ 定义一个点的美丽值为所有包含这个点的圆的编号和 定义函数$f(n)$为只有$n$个圆时所有点的贡献,求$\sum_{k= ...
- python-day21--time模块
一.三种表示方法 1.时间戳(timestamp): time.time( ) #得到的是float类型 2.格式化(Format String): time.strftime('%Y/% ...
- Leetcode 78
//和77类似的问题,可以放在一起记忆class Solution { public: vector<vector<int>> subsets(vector<int> ...
- OC MRC之计数器的基本操作(代码分析)
/* 1.方法的基本使用 1> retain :计数器+1,会返回对象本身 2> release :计数器-1,没有返回值 3> retainCount :获取当前的计数器 4> ...
- Vue--- 手动禁止ESlint
使用vue-cli构建项目时,通常会问你要不要 “Use ESlint to lint your code?” 建议使用,这样会有助于规范我们的代码(这也是一种审美),ESlint的规范就不说了,写多 ...
- 简话Angular 04 Angular过滤器详解
一句话: filter是万能的数据处理器,可以过滤数据,排序数据,删除数据,扩展数据 1. 内置filter大全 url: https://docs.angularjs.org/api/ng/filt ...
- mysql 索引原理及查询优化 -转载
转载自 mysql 索引原理及查询优化 https://www.cnblogs.com/panfb/p/8043681.html 潘红伟 mysql 索引原理及查询优化 一 介绍 为何要有索引? ...
- ADOX创建ACCESS 表时,几个附加属性
中文 英文 允许空字符串 Jet OLEDB:Allow Zero Length Unicode压缩 Jet OLEDB:Compressed UNICODE Strings 有效性规则 Jet ...
- python的if语法
在赋值表达式中 a=a+3 if a else 0 这种简洁的语法,似乎必须要跟上else,不能写成 a=a+3 if a ,否则会报错