一、错误:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderServlet
二、背景:采用下面方式启动spring。
<servlet>
<servlet-name>contextConfigLocation</servlet-name>
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
三、原因:
1、是缺少了jar包?NO!(或许你的是,如果你使用的是spring 3.0以前的版本)
2、是因为spring 3.0中删除了ContextLoaderServlet! 悲剧吧?好了,这是问题的终极。
看看这篇:http://www.iteye.com/problems/33481 spring 3.0 中删除了ContextLoaderServlet?