Struts2配置文件
严重:DispatcherinitializationfailedUnabletoloadconfiguration.-action-file:/D:/Program%2...
严重: Dispatcher initialization failed
Unable to load configuration. - action - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:22:73
Caused by: Error building results for action LoginAction_* in namespace / - action - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:22:73
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.loadPackages(XmlConfigurationProvider.java:264)
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)
... 31 more
Caused by: There is no result type defined for type 'redirect-action' mapped with name 'success'. Did you mean 'redirectAction'? - result - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:24:50
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
... 36 more
struts.xml
<package name="mypackage" namespace="/" extends="struts-default">
<action name="LoginAction_*" method="{1}" class="com.tur.LoginAction">
<interceptor-ref name="paramsPrepareParamsStack"/>
<result type="redirect-action" name="success">/main.jsp</result>
<result name="input">/login.jsp</result>
</action>
<action name="crud" method="{1}" class="com.tur.UserAction">
<result name="list">/userList.jsp</result>
<result name="success" type="redirect-action">crud!list</result>
<result name="input">/userForm.jsp</result>
</action> 展开
Unable to load configuration. - action - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:22:73
Caused by: Error building results for action LoginAction_* in namespace / - action - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:22:73
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.loadPackages(XmlConfigurationProvider.java:264)
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)
... 31 more
Caused by: There is no result type defined for type 'redirect-action' mapped with name 'success'. Did you mean 'redirectAction'? - result - file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts_2/WEB-INF/classes/example.xml:24:50
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
... 36 more
struts.xml
<package name="mypackage" namespace="/" extends="struts-default">
<action name="LoginAction_*" method="{1}" class="com.tur.LoginAction">
<interceptor-ref name="paramsPrepareParamsStack"/>
<result type="redirect-action" name="success">/main.jsp</result>
<result name="input">/login.jsp</result>
</action>
<action name="crud" method="{1}" class="com.tur.UserAction">
<result name="list">/userList.jsp</result>
<result name="success" type="redirect-action">crud!list</result>
<result name="input">/userForm.jsp</result>
</action> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询