Spring Web MVC Application Error:ClassNotFoundException: DispatcherServlet on deploying

In this video tutorial I will explain you how to resolve the java. lang. ClassNotFoundException: org. springframework. web. servlet. DispatcherServlet Exception while deploying the application on Tomcat server from Eclipse IDE.

Ads

Tutorials   
Spring 4 Introduction and example Features of Spring Framework 5 How to make Spring web Login form? How to make Simple form in Spring web? Spring, Hibernate login and registration application Spring Framework Tutorial for beginners with examples Spring Framework for Apache Hadoop 2.3.0 GA released Spring Framework 4.1 GA is released with major features Why to use Spring Framework? Spring Framework 4.1 - First Release candidate available Spring IO Platform 1.0.0 Released Spring 4: Login Form using Spring MVC and Hibernate Example Spring 4 MVC Login form Example with source code Spring 4 MVC Hello World Example: Spring 4 MVC Tutorial will full source code Spring Web MVC Application Error:ClassNotFoundException: DispatcherServlet on deploying Features of Spring 4 Spring Framework 4.0 released Spring Framework 4: Spring Framework 4 Tutorials and Example Spring Integration 3.0 Release is released and available for download Spring Tutorial for Beginners Java Springs Framework Tutorial Spring Architecture Spring Framework Tutorials database spring registration form Spring Login Example Roseindia Spring Tutorial Spring Tutorial Spring 3.2 MVC insert and retrieve blob from the database The hidden tag The errors tag net.roseindia.dao net.roseindia.service net.roseindia.model net.roseindia.controller Spring 3.2 MVC Hibernate Example Spring 3.2 MVC, Upload File in a specific folder Spring 3.2 MVC Form Handling The textarea tag The options tag The option tag The select tag The radiobuttons tag The radiobutton tag The checkboxes tag mvc:default-servlet-handler Static Resources Configuration View Controllers Configuration View resolvers Spring 3.2 MVC Hello World Example Content Negotiation Configuration
Ads

This video tutorial is discussing about the Solution of the error  java. lang. ClassNotFoundException: org. springframework. web. servlet. DispatcherServlet

I am discussing about the Spring Web MVC Application Error: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet while deploying on the Tomcat from Eclipse

Eclipse is one of the most used free IDE for development of the application. But some times you may find some error while using the tool. If you are working on Maven based application you might find that the Eclipse is not including the maven dependencies while deploying the application on the Tomcat server. Such error occurs when you try to deploy the application by clicking the "Run As" -> "Run on Server" and then you are selecting the Tomcat server.

The main reason is that the Eclipse is not including the Maven dependencies jar file while running the Tomcat server. Here in this video tutorial I will explain you how to resolve the error. Check the following video tutorial:

Above video tutorial explains you the steps to resolve the Error: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet.

Here is the steps in brief:

Step 1: Open the project setting as shown in the following screen shot:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

and click on "Properties".

Step 2: Selecting the maven libraries.

Select the "Deployment Assembly" as shown bewlow:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

To select the Maven (Spring dependencies) click on the 'Add button' as shown below:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Then select "Java Build Path Entries" and then click on the "Next >" button as shown below:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Now select all the libraries as shown below:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

and then click on the "Finish" button.

Following screen shows all the Maven dependencies jar files are added as shown below:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Step 3: Run the project on Tomcat.

Now you can run and test your application on Tomcat as shown below:

Solution of the error  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

In this video you have learned how to add the Maven dependencies to the "Deployment Assembly" so that jar files of the Maven dependencies are used while running the web application on the Tomcat server.

Further reading:

Advertisements

Share on Google+Share on Google+

Spring Web MVC Application Error:ClassNotFoundException: DispatcherServlet on deploying

Posted on: May 2, 2014 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 
Comments:0

Ads

 

Ads