Spring MVC Hello World with Maven and Eclipse

In this article, we will go through the steps to create a Spring MVC application using Maven, Eclipse and deploy it on Tomcat server.   Here is an overview of the steps involved:   Create Maven web project Import project in Eclipse Add required spring mvc dependencies. Define the DispatcherServlet in web.xml Create servlet.xml for application […]

Spring 4 Hello World using Annotation based approach

In this article, we will create a Hello World program in Spring4 with the annotation based configuration.   We will be using Eclipse as the IDE and Maven for creating the project structure and adding needed dependencies.   Here are the steps:   Step 1: (Create a simple maven project)   Run the following command […]

Spring 4 Hello World using XML based configuration

In this article, we will create a Hello World program in Spring4 with the XML configuration based approach.   We will be using Eclipse as the IDE and Maven for creating the project structure and adding needed dependencies.   Here are the steps:   Step 1: (Create a simple maven project)   Run the following command to […]

Import Maven project in Eclipse

After creating a maven project using maven archetype:generate command, the maven project would be generated, but you can’t directly import it into Eclipse as a normal project.   You can import the project in Eclipse in following ways:   Run mvn eclipse command to create eclipse project structure and then import as normal project   (OR) […]

Missing src/main/resources in Maven project

When you execute mvn archetype:generate to create a project from an archetype, it creates the necessary project structure for the project.   The folder src/main/resources is supposed to contain the resource files like xmls and property files and is normally created at the time of project creation.     Class path resource error   If […]