运行Struts2-blank-2.0.9 Demo时出现异常
我将struts2和xwork2的源码都放入workspace,然后运行struts2-blank这个struts的自带demo,tomcat启动时出现这个错误,看起来像是默认就去初始化spring的context,详细stackTrace如下:
2007-9-4 13:12:58 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register信息: Parsing configuration file [struts-default.xml]2007-9-4 13:12:59 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register信息: Parsing configuration file [struts-plugin.xml]2007-9-4 13:12:59 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register信息: Parsing configuration file [struts.xml]2007-9-4 13:12:59 org.apache.struts2.config.Settings getLocale警告: Settings: Could not parse struts.locale setting, substituting default VM locale2007-9-4 13:13:00 org.apache.struts2.spring.StrutsSpringObjectFactory <init>信息: Initializing Struts-Spring integration...2007-9-4 13:13:00 org.apache.struts2.spring.StrutsSpringObjectFactory <init>严重: ********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION **********Looks like the Spring listener was not configured for your web app! Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.You might need to add the following to web.xml: <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>2007-9-4 13:13:00 org.apache.catalina.core.StandardContext start严重: Error filterStart2007-9-4 13:13:00 org.apache.catalina.core.StandardContext start严重: Context [/test] startup failed due to previous errors
不知该如何解决。
BTW,我把WAR包直接丢到tomcat下,就可以运行正常,看起来好像是多加了一些jar包导致的。 1 楼 wangyugod 2007-09-04 这个问题已经解决,问题是由加入了spring-plugin.jar造成的,只要去掉就不会再产生这个问题 2 楼 wangyugod 2007-09-04 这个问题已经解决,问题是由加入了spring-plugin.jar造成的,只要去掉就不会再产生这个问题