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 ...
随机推荐
- 一些有趣的使用function
转载来源:新人必看的短小而精悍的javascript function 1.回到顶部,优点使用浏览器刷新频率的requestAnimationFrame,很顺滑 const scrollToTop = ...
- 『Glob』常用方法记录
glob.glob(file) 返回匹配的文件 glob.glob(./flower_photos/tulips/*.jpg) Out[1]:<br># ['./flower_photos ...
- UVA-1632 Alibaba (区间DP+滚动数组)
题目大意:在一条直线上有n件珠宝,已知每件珠宝的位置,并且第 i 件珠宝在 ti 时刻就消失,问能否将所有的珠宝收集起来?如果能,求出最短时间.搜集能瞬间完成. 题目分析:区间DP.dp(i,j,0) ...
- NuGet 控制台代码
安装 Bootstrap 包:Install-package -version 3.0.0 bootstrap -projectname SportsStore.WebUI 这三句常常连用,在不同项目 ...
- 常见MIME类型例表
常见MIME类型例表: 序号 内容类型 文件扩展名 描述 1 application/msword doc Microsoft Word 2 application/octet-stream bin ...
- xmind visio mindmanager edraw比较
xmind visio mindmanager edraw比较 xmind visio mindmanager Edraw 中心主题 有 无 有 泳道图 无 有 有 结构上讲 [思维导图] ...
- adb命令(笔记)
1.adb shell su 进入root管理员权限(前提是手机已root) 2.chmod 可以修改文件夹的权限: $ adb shell $ su # chmod -R 777 /data/ ...
- c++ 发送消息,模拟拖拽文件
#include <ShlObj.h> BOOL SimulateDropFile(CString strFilePath) { }; wcstombs(szFile, strFilePa ...
- Awk 从入门到放弃(4) — Aws 格式化
转:http://www.zsythink.net/archives/1421 print & printf的区别:printf不带\r\n 在awk当中,格式替换符的数量必须与传入的参数的数 ...
- Openwrt Support MINI-PCIE EC20 (6)
1 Scope of Document This document describes MINI PCIE usb hardware design, for EC20 4G module 2 ...