java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener


Eclipse中使用CXF部署WebService,启动Tomcat时报错:
java.lang.ClassNotFoundException: org.springframework.web.context.WebApplicationContext
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
......

解决办法:
1.将org.springframework.web-3.0.5.RELEASE.jar拷贝到WEB-INF/lib目录下
2.在web.xml中加入
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>



你可能感兴趣的:(java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener)