struts2-spring-plugin-2.8.1.jar包是Struts2提供支持spring的一个插件,如果在项目中未使用到Spring又将此包加入项目中时,在启动WEB服务器时后报如下错误
以下为TOMCAT6.X的错误信息:
严重: ********** FATAL ERROR STARTING UP SPRING-STRUTS 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>
2010-5-5 22:12:24 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter GMBMVC
因此,大家需要注意此包必须在同时使用Struts2和Spring时才将struts2-spring-plugin-2.0.6.jar包加入项目工程中去,没有涉及到的包不要加入项目~!!!!!!!!
Struts2工程中需要用到的包有:commons-logging-api-1.0.4.jar、freemarker-2.3.15.jar、ognl-2.7.3.jar、struts2-core-2.1.8.1.jar、xwork-core-2.1.6.jar