"No result defined for action ... and result input"错误一般发生在Struts2的拦截器拦截时遇到了问题时。Struts2会将跳转到result为input的视图上,可是在配置文件里并没有给这个Action配置input的result。

能够建立一个内容为例如以下的Jsp文件。并在配置文件里配置result为input时跳转此文件。将会显示出详细的错误原因。

<div style="color:red">
<s:fielderror />
</div>

假设Jsp显示的错误原由于"Invalid field value for field ..."。说明Struts2的ParametersInterceptor在进行类型转换的时候出现了错误。比如时间格式错误、表单提交文件时没有使用Post方式或者没有加上“enctype="multipart/form-data"”。假设实在找不到错误原因,能够尝试在ParametersInterceptor的doIntercept方法中断点调试,查看ActionContext ac的parameters中属性的类型。

[Struts2] No result defined for action ... and result input &amp; Invalid field value for field ...的更多相关文章

  1. No result defined for action and result input

    今天在编程的时候,我遇到了No result defined for action and result input的错误,这个错误想必大家都有遇到过吧,我今天发了很长时间弄这个错误,我以为我的Act ...

  2. s2h-HTTP Status 404 - No result defined for action and result input错误解决

    今天做个小项目,用的是ssh,结果在运行的时候出现HTTP Status 404 - No result defined for action and result input的错误. 首先认真检查所 ...

  3. 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的异常,就是在因 ...

  4. SSH整合报错:No result defined for action and result input

    目前发现这个问题主要是在Action中的execute返回值时,没有对应的result name而引起的.很有可能是由于程序执行中出错了,但是对 应的Action中没有添加 input的result  ...

  5. 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,不能够 ...

  6. no result defined for action

    1.no result defined for action .......and result input    或者 no result defined for action .......and ...

  7. Struts2报错:No result defined for action xxx and result input

    case如下: 1. 后台程序要升级, 修改了一些功能,但是没有修改或者添加action的参数. 2. 数据库需要升级,执行了一些sql,修改过action的值. 3. 当修改某个已经存在的记录,然后 ...

  8. Struts2.3动态调用报 No result defined for action 错误

    struts 2.3.16  採用动态调用发现不工作报404 not found,网上查找原因: 1.由于:struts2中默认不同意使用DMI 所以:须要在配置文件里打开: <constant ...

  9. struts2没有打印日志原因和No result defined for action XXXAction and result input

    在项目中调用一个action的方法的时候发生了一个错误,但是在catalina.out和配置的log4j都没有打印异常,后来在执行的action中加了logger.error("XXXXX& ...

随机推荐

  1. Codeforces Round #338 (Div. 2) B. Longtail Hedgehog 记忆化搜索/树DP

    B. Longtail Hedgehog   This Christmas Santa gave Masha a magic picture and a pencil. The picture con ...

  2. 使用记事本开发第一个java程序

    记事本是开发java程序最基础的一个工具 第一步:编写 新建一个文件名为Hello的文本文档,并将文件扩展名改为.java. 在文本框内输入我们的程序代码 ——————————————我是分割线——— ...

  3. ubuntu16.04+caffe训练mnist数据集

    1.   caffe-master文件夹权限修改 下载的caffe源码编译的caffe-master文件夹貌似没有写入权限,输入以下命令修改: sudo chmod -R 777 ~/caffe-ma ...

  4. webservice为什么不能用List参数,而只能用数组代替,我想是否因为List没有具体的类型信息,但用泛型的List(如:List<customer>)为什么也不行。如果用作参数的类中含有List<T>字段该如何处理?webservice参数是否支持

    转自:https://social.microsoft.com/Forums/zh-CN/aded4301-b5f1-4aa6-aa46-16c46a60d05e/webservice20026201 ...

  5. c++面向对象程序设计 课后题 答案 谭浩强 第四章

    c++面向对象程序设计课后题答案 谭浩强 第四章 1: #include <iostream> using namespace std; class Complex {public: Co ...

  6. 42.写入XML

    #include <QtGui> #include <QtXml> #include <iostream> //创建一个树结构 void populateTree( ...

  7. POJ 2346 DP or打表

    这题 不算重复的数.. 就变成水题了. 思路: 1.打表 2.DP 打表的: // by SiriusRen #include <cstdio> using namespace std; ...

  8. KCP kcptun

    简介 KCP是一个快速可靠协议,能以比 TCP浪费10%-20%的带宽的代价,换取平均延迟降低 30%-40%,且最大延迟降低三倍的传输效果.纯算法实现,并不负责底层协议(如UDP)的收发,需要使用者 ...

  9. 弹出ifame页面(jquery.reveal.js)

    <body> <a data-reveal-id="myModalDailyModify" data-animation="fade" tit ...

  10. struts2学习之基础笔记7

    第十二章 Struts 2的标记库 1 OGNL简介 Object-Grephic Navigtor Language 图对象导航语言 作用:图对象导航语言是Struts 2标记库中为其相应标记属性进 ...