运行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 locale
2007-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 filterStart
2007-9-4 13:13:00 org.apache.catalina.core.StandardContext start
严重: Context [/test] startup failed due to previous errors

不知该如何解决。
BTW,我把WAR包直接丢到tomcat下,就可以运行正常,看起来好像是多加了一些jar包导致的。

你可能感兴趣的:(apache,spring,tomcat,xml,struts)