struts中调用了一个类的静态方法后出现No result defined for action com.kpi.grop1.action.Faculties
RT
配置应该是正确的把这段调用类的静态方法去掉以后,可以正常运行,一旦加上这个方法就会报错
No result defined for action com.kpi.grop1.action.FacultiesAction and result error
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:376)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
可是这个方法我在junit中测试能够正常通过,不知道是哪的问题
------解决方案--------------------No result defined for action com.kpi.grop1.action.FacultiesAction and result error
配置中添加个result name为error,看看是什么错误信息