Problem
Running the application using eclipse's server you get the following exception:
spring java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
Solution
Check if you have the spring-mvc jar in the project's classpath.
If using maven, you must have something like this in your pom.xml:
<!-- Spring 3 MVC depends on spring-core, spring-beans, spring-context, spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
If you respective reference is verified and correct, just remove the project from your server.
Perform a project clean, building everything from scratch.
Deploy the project again.
Sometimes, the eclipse's server may fail requiring a new deploy.
No comments:
Post a Comment