Part 1-Spring MVC project with eclipse

Select new project and look for maven folder on the popup wizard.

Select your workspace location

filter the maven archetype as: maven-archetype-webapp and click on next.

Fill the artifact id and group id and click on next

Optionally you might face the situation where your eclipse do not find javax.servlet.http.HttpServlet  as below. In this case you would have to add the dependency for HttpServlet

If the above error occurred, then add the below dependency in your project.

<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>javax.servlet-api</artifactId>
   <version>3.1.0</version>
</dependency>

    Now build project with “Maven Clean Install” to check there isn’t any dependency issue with the project.

 

We should get a build success like below

Now we can deploy the application on apache tomcat server using eclipse like below. Navigate to servers view. Then right-click on the server. And select add or remove the option

 

Doubts? WhatsApp me !