struts2一个action访问另外一个action问题
<action name="index" class="comAction"
method="PageQueryCom">
<result name="success">/index.jsp</result>
<result name="input">/index.jsp</result>
</action>
action name="recyclebins" class="comAction" method="recyclebins">
<result name="success" type="index">index</result>
<result name="input" >/index.jsp</result>
</action>
严重: Exception starting filter Struts2
Unable to load configuration. - action - file:/H:/apache-tomcat-7.0.16/webapps/Domain_test/WEB-INF/classes/struts.xml:18:69
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4584)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5262)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5257)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: Error building results for action recyclebins in namespace / - action - file:/H:/apache-tomcat-7.0.16/webapps/Domain_test/WEB-INF/classes/struts.xml:18:69
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:366)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 16 more
Caused by: There is no result type defined for type 'index' mapped with name 'success'. Did you mean 'indexAction'? - result - file:/H:/apache-tomcat-7.0.16/webapps/Domain_test/WEB-INF/classes/struts.xml:19:46
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:613)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:364)
... 21 more
2012-1-30 18:55:36 org.apache.catalina.core.StandardContext startInternal
严重:
Error filterStart------解决方案--------------------
关键是:<result name="success" type="index">index</result>这句话想干啥?
如果你是想继续引用index那个Action的话,应该是:
<result name="success" type="chain">index</result>