No result defined for action *Action and result input - action

No result defined for action *Action and result input - action -

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

No result defined for action *Action and result input - action -
.......

在 struts2 中,如果页面或者控制台报以上的错误,那么可以肯定你没有配置[color=red]<result type="input">xxx.jsp</result>[/color]
这个是验证时指定输出的页面,必须要写的,最好与你输入页面时同一个
但这只是从字面意思的理解,struts2中默认的是如果错误发生就跳转到input

而且你所定义的 action 可能也有问题。
有的时候可能你写的重定向如以下
<result type="redirect">yyy.action</result>
那么它也将出现以上的错误。因为你本就不想要 result type="input"

那么最好你使用以下的方式进行 action 的重定向操作
因为它将把 action 中的属性及定义传递下去而上面的方式是不行的。
<result type="redirect-action">yyy.action</result>

如果不是上面所提的问题,还是报错的话
那就是你页面上的数据与action中对应属性的数据类型不匹配导致的
查看action中的属性的get set方法是否都有
然后再看看类型 这点很重要 我这个问题找了老半天
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值