struts2 中redirect重定向 <result name= "",type="redirectAction" 总是提示错误

附近 发布于 2016/08/25 15:30
阅读 1K+
收藏 0

错误信息如下:

严重: Dispatcher initialization failed
Unable to load configuration. - action - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:29:79
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
 at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: Error building results for action loginAction in namespace /user - action - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:29:79
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:367)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:468)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.reloadRequiredPackages(XmlConfigurationProvider.java:290)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
 at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
 ... 20 more
Caused by: There is no result type defined for type 'redirect-Action' mapped with name 'success'.  Did you mean 'redirectACtion'? - result - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:32:50
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
 ... 26 more
八月 25, 2016 11:06:10 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts
Unable to load configuration. - action - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:29:79
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)
 at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: Unable to load configuration. - action - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:29:79
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
 ... 18 more
Caused by: Error building results for action loginAction in namespace /user - action - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:29:79
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:367)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:468)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.reloadRequiredPackages(XmlConfigurationProvider.java:290)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
 at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
 ... 20 more
Caused by: There is no result type defined for type 'redirect-Action' mapped with name 'success'.  Did you mean 'redirectACtion'? - result - file:/E:/apache-tomcat-7.0.52-windows-x64/apache-tomcat-7.0.52/webapps/CapyDang/WEB-INF/classes/config/struts/struts-user.xml:32:50
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
 ... 26 more
八月 25, 2016 11:06:10 上午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
八月 25, 2016 11:06:10 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/CapyDang] startup failed due to previous errors
八月 25, 2016 11:06:10 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/CapyDang] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@140b06e2]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@2ae8e247]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
八月 25, 2016 11:06:10 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/CapyDang] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@6e8952b4]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@51abbc36]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
八月 25, 2016 11:06:10 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\apache-tomcat-7.0.52-windows-x64\apache-tomcat-7.0.52\webapps\ROOT
八月 25, 2016 11:06:10 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
八月 25, 2016 11:06:10 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
八月 25, 2016 11:06:10 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 6571 ms

struts2配置信息:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
    "http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
 <package name="user" namespace="/user" extends="dang-default">
  <!-- 跳转注册页面 -->
  <action name="toRegistAction" class="com.dangdang.web.action.user.ToRegistAction">
   <result name="register_form">
    /WEB-INF/jsp/user/register_form.jsp
   </result>
  </action>
  <!-- 注册 -->
  <action name="regist" class="com.dangdang.web.action.user.RegistAction">
   <interceptor-ref name="tokenSession"></interceptor-ref>
   <interceptor-ref name="defaultStack"></interceptor-ref>
   <result name="verify">/WEB-INF/jsp/user/verify_form.jsp</result>
  </action>
  <!-- 跳转登录 -->
  <action name="tologinAction" class="com.dangdang.web.action.user.ToLoginAction">
   <result name="login_form">
    /WEB-INF/jsp/user/login_form.jsp
  </result>
  </action>
  <!-- 登录 -->
  <action name="loginAction" class="com.dangdang.web.action.user.LoginAction">
   <result name="login">/WEB-INF/jsp/user/login_form.jsp</result>
   <result name="verify">/WEB-INF/jsp/user/verify_form.jsp</result>
   <result name="success" type="redirectAction">这个地方提示出错
  <param name="actionName">mainAction</param></result>
  </action>
  <!-- 邮箱验证 -->
  <action name="verify" class="com.dangdang.web.action.user.VerifyAction">
   <interceptor-ref name="tokenStack"></interceptor-ref>
   <result name="verify">/WEB-INF/jsp/user/verify_form.jsp</result>
   <result name="success">/WEB-INF/jsp/user/register_ok.jsp</result>
  </action>
  <!-- 登出 -->
  <action name="logout" class="com.dangdang.web.action.user.LogoutAction">
   <result>/WEB-INF/jsp/user/login_form.jsp</result>
  </action>
  <!-- 图形验证码 -->
  <action name="checkCode" class="com.dangdang.web.action.user.CheckCodeAction">
   <result name="success" type="stream">
    <param name="inputName">imageStream</param>
   </result>
  </action>
 </package>
 <package name="validate" namespace="/user" extends="json-default">
  <!-- 注册时的表单ajax验证 -->
  <action name="registVali" class="com.dangdang.web.action.user.RegistValiAction">
   <result name="success" type="json"></result>
  </action>
 </package>
</struts>

加载中
返回顶部
顶部