IT技术专栏 - 软件开发 - java - IT文章 - struts关于spring的奇怪问题
struts关于spring的奇怪问题
http://www.wenhq.com/article/view_128.html 2007-11-21 14:32:00 来源:
关键词 :
   在web的lib下,加了struts2-spring-plugin-2.0.6。jar包文件,我只用struts,没有配置与spring有关的任何内容,结果显示错误信息:
FATAL [org.apache.struts2.spring.StrutsSpringObjectFactory:74] ********** 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>
2007-11-21 14:34:10 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:188)

把struts2-spring-plugin-2.0.6.jar从lib中删除一切都正常,说明只要有这个包,则必须配置spring监听。

本文链接地址:http://www.wenhq.com/article/view_128.html
共有 人次浏览 收藏本页 返回上一页 责任编辑:
放松一下