struts2-spring-plugin-2.8.1.jar问题

本文介绍了一个关于Struts2与Spring集成时常见的错误,当项目中未使用Spring但加入了struts2-spring-plugin-2.8.1.jar插件时,可能会导致TOMCAT启动失败,并给出了相应的解决方案。

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值