Struts2:(No result defined for action ** and result input) is not available.
2011-11-22 04:02
645 查看
当你在用struts2开发时,如果,从页面跳入action时,页面报No result defined for action and result时,大部分的原因有以下几种:
1、validate方法没有通过;
2、页面元素中有重命名时,但后台action类的对应的接收此同名参数的是变量而没有写成数组,这个极有可能,我就碰到过,搞了好久才发现是这个原因
要检查这种错误时,可以
1,在后台action类中重写ActionSupport中的
void addActionError(String anErrorMessage)
void addActionMessage(String aMessage)
void addFieldError(String fieldName, String errorMessage)
这三个方法,在并在其实现代码中设置断点,监控传入的参数,并可获知页面的相关报错具体原因.
2,在页面中加入以下标签,将错误显示出来:
<div style=”color:red”>
<s:fielderror />
</div>
1、validate方法没有通过;
2、页面元素中有重命名时,但后台action类的对应的接收此同名参数的是变量而没有写成数组,这个极有可能,我就碰到过,搞了好久才发现是这个原因
要检查这种错误时,可以
1,在后台action类中重写ActionSupport中的
void addActionError(String anErrorMessage)
void addActionMessage(String aMessage)
void addFieldError(String fieldName, String errorMessage)
这三个方法,在并在其实现代码中设置断点,监控传入的参数,并可获知页面的相关报错具体原因.
2,在页面中加入以下标签,将错误显示出来:
<div style=”color:red”>
<s:fielderror />
</div>
相关文章推荐
- 【填大坑】关于Struts2中的 No result defined for action and result input 错误
- struts2:No result defined for action com.jcyj.action.fitting.FittingsAction and result input
- Struts2——No result defined for action and result input - action错误(今天也遇到,没见过很难找)
- struts2的那些事儿--No result defined for action.....and result input
- Struts2——No result defined for action and result input - action错误
- Struts2问题,已解决No result defined for action and result input
- [SSH]Struts2 -- No result defined for action and result input
- [Struts2] No result defined for action ... and result input & Invalid field value for field ...
- Struts2常见错误-No result defined for action XXX and result input
- Struts2报错:No result defined for *action and result input
- struts2的一个异常:No result defined for action XXX and result input
- struts2 no result defined for action xxxx and result input
- Struts2报错:No result defined for action xxx and result input
- [Struts2] No result defined for action ... and result input & Invalid field value for field ...
- struts2的No result defined for action 。。。。and result input 问题
- [SSH]No result defined for action and result input 和 Struts2中关于值跳转input,而不执行action的问题
- HTTP Status 404 - No result defined for action EmployeeAction and result input - struts2类似异常解决及原因剖析
- struts2的那些事儿--No result defined for action.....and result input
- struts2环境配置是出现No result defined for action *** and result input”的错误信息
- No result defined for action action.UploadAction and result input(开发错误记录struts2)