数码产品

No result defined for action com.java.test.Action.HelloAction and result index

Struts中配置action访问出错:

 

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
  • No result defined for action com.java.test.Action.HelloAction and result index
File: file:/J:/javaTest/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSHProject/WEB-INF/classes/struts.xml
Line number: 10
Column number: 84


<package name="hello"   namespace="/hello" extends="struts-default">
<action name="HelloAction" class="com.java.test.Action.HelloAction" method="hello">
<result name="hello">/hello.jsp</result>
<!-- <result name="index">/index.jsp</result>

Stacktraces

No result defined for action com.java.test.Action.HelloAction and result index - action - file:/J:/javaTest/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSHProject/WEB-INF/classes/struts.xml:10:84
    org.apache.struts2.rest.RestActionInvocation.findResult(RestActionInvocation.java:283)
    org.apache.struts2.rest.RestActionInvocation.executeResult(RestActionInvocation.java:225)
    org.apache.struts2.rest.RestActionInvocation.processResult(RestActionInvocation.java:189)
    org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:137)
    com.opensymphony.xwork2.DefaultActionProxy.execute(DefaultActionProxy.java:157)
    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574)
    org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79)
    org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Thread.java:745)
    

解决办法:删除lib下的这个Struts2-Convention-Plugin.jar包
posted @ 2019-07-20 17:53  Hackerman  阅读(259)  评论(0编辑  收藏  举报
数码产品