No result defined for action ** and result input 解决
2013-11-27 16:17
483 查看
The error message means that an result named inputhas not been defined for your action. The result inputis a default result returned by Struts when there is a problem with validating the parameters passed to an action. Thus, I recommend to check and ensure that the parameters you are passing from your HTML form match the parameters of your action. Check spelling, data types etc INPUT:Action的执行,需要从前端界面获取参数,INPUT就是代表这个参数输入的界面,一般在应用中,会对这些参数进行验证,如果验证没有通过,将自动返回到该视图。 用加注塑方法排除,结果是html与action某些数据类型不一致 我在动作的第一个语句前加断点,发现根本就没有进动作,现在想来原因是struts2是先经过拦截器,再到动作,这个流程我以前也知道,但没放在心上,这次就是拦截器爆出的错,然后直接就不经过动作了,害我找了很久的错,才重新回忆起这个流程,最后我在动作所在类中加了一个方法 [java] view plaincopy public void validate() { if(article != null) System.out.println(article.getCategory()); } 在if语句处打断点,断点就能起作用,验证了我的想法。这种方法以后可以用来检查未进入动作(action)的原因。 |
相关文章推荐
- HTTP Status 404 - No result defined for action EmployeeAction and result input - struts2类似异常解决及原因剖析
- 解决 No result defined for action xxxAction and result input
- No result defined for action action and result input 解决办法——struts2 文件上传
- Struts2问题,已解决No result defined for action and result input
- 关于Struts2报"No result defined for action +(包名) and result input"的解决方法
- HTTP Status 404 - No result defined for action EmployeeAction and result input - action类似异常解决及原因剖析
- 关于No result defined for action com.gen.action.FrontAction and result input解决方法
- 随机出现“No result defined for action ....Action and result input”解决
- 随机出现“No result defined for action ....Action and result input”解决
- 解决No result defined for action action.bookstore.AddInfoAction and result input
- HTTP Status 404 - No result defined for action …… and result input。
- No result defined for action and result input异常
- No result defined for action and result input
- 关于问题“404 No result defined for action XXXAction and result input ”的见解
- 404-No result defined for action and result input 错误
- [Struts2] No result defined for action ... and result input & Invalid field value for field ...
- No result defined for action action.LoginAction and result success 问题解决
- Struts2 项目报错 No result defined for action com.xxx.xxAction and result input
- No result defined for action com.igit.contract.web.action.ContContractAction and result input
- No result defined for action and result input