Struts Problem Report
Struts has detected an unhandled exception:
Messages: No result defined for action com.bcp.web.hr.employee.ApplyForLeaveAction and result input
----------------------------------------------------------------------
Stacktraces
No result defined for action com.bcp.web.hr.employee.ApplyForLeaveAction and result input
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:364)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
解决:
首先,检查配置文件,然后用一个页面,直接提交一个action看能否提交,如果不能,那么,直接告诉你,你配置文件错了,也就是说你action的名字错了,自己检查吧。
其次, 提交的内容,model接受转化不了指定类型,name=hours value=“创建” 该是指定的double类型,换成value=“1”即可
Struts has detected an unhandled exception:
Messages: No result defined for action com.bcp.web.hr.employee.ApplyForLeaveAction and result input
----------------------------------------------------------------------
Stacktraces
No result defined for action com.bcp.web.hr.employee.ApplyForLeaveAction and result input
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:364)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
解决:
首先,检查配置文件,然后用一个页面,直接提交一个action看能否提交,如果不能,那么,直接告诉你,你配置文件错了,也就是说你action的名字错了,自己检查吧。
其次, 提交的内容,model接受转化不了指定类型,name=hours value=“创建” 该是指定的double类型,换成value=“1”即可
本文详细解析了使用Struts框架时遇到未处理异常的问题,包括错误信息解读、问题定位以及解决步骤,并提供了实际案例演示,帮助开发者快速解决配置错误和数据类型转换问题。
677

被折叠的 条评论
为什么被折叠?



