Issue - java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
CNF exception should always make you think "I'm missing a JAR."
In this case, you want the Spring 3.0.5 JAR named org.springframework.web.servlet-3.0.5.RELEASE.jar
. it contains the DispatcherServlet
.
If you think they're in your CLASSPATH, perhaps you don't understand how to set it properly.
You should not have a CLASSPATH environment variable.
The Spring JARs and all their dependencies should be in your WEB-INF/lib.
If you're using Maven, you need this dependency:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<!-- Set this to the respective version -->
<version>3.0.5.RELEASE</version>
</dependency>