struts2重定向问题:
<actionname="login"class="LoginAction"><resultname="menu"type="redirect-action">menu....
<action name="login" class="LoginAction">
<result name="menu" type="redirect-action">menu.action</result> >
<result name="input">/frame/login.jsp</result>
</action>
<action name="menu" class="MenuAction">
<result name="success">/frame/frame.jsp</result>
<result name="input">/frame/login.jsp</result>
</action>
报错:
严重: Exception starting filter struts2
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/D:/Program%20Files/Tomcat%206.0/webapps/wrqsw/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452) 展开
<result name="menu" type="redirect-action">menu.action</result> >
<result name="input">/frame/login.jsp</result>
</action>
<action name="menu" class="MenuAction">
<result name="success">/frame/frame.jsp</result>
<result name="input">/frame/login.jsp</result>
</action>
报错:
严重: Exception starting filter struts2
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/D:/Program%20Files/Tomcat%206.0/webapps/wrqsw/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452) 展开
1个回答
展开全部
1.给你个忠告:java里面是最讨厌路径存在空格的,file:/D:/Program%20Files/Tomcat%206.0 其中的%20已经表明你这里路径面是存在空格的,虽然
有时候会不出错,但是还是建议jdk放在一个没有空格的路径
2.你这段代码是拷贝出来的么?(<result name="menu" type="redirect-action">menu.action</result> >)最后面怎么有两个“>”
3.action的重定向应该type="redirectAction"在两个result之间只要写menu就好了,不用写.action的
有时候会不出错,但是还是建议jdk放在一个没有空格的路径
2.你这段代码是拷贝出来的么?(<result name="menu" type="redirect-action">menu.action</result> >)最后面怎么有两个“>”
3.action的重定向应该type="redirectAction"在两个result之间只要写menu就好了,不用写.action的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询