In the Eclipse IDE, navigate to File > New > Other… in order to bring up the project creation wizard.
Scroll to the Maven folder, open it, and choose Maven Project. Then choose Next.
You should choose to Create a project . This will create a Maven-enabled Java project. click Next.
Select Catalog Internal and enter 'Web' in Filter textbox. Choose maven-archetype-webapp Artifact ID and click Next button.
Enter your Project Name in Group ID and Artifact ID. Enter your base package name in Package Text field and click Finish button. It will create your project.
You will now notice that your project has been created. You will place your Java code in/src/main/java, resources in /src/main/resources, and your JSP, HTML and web contents in /src/main/webapp respectively.
Open the pom.xml file to view the structure Maven has set up. In this file, you can see the information entered in Step # 5. You can add Servlet dependencies using following tag in pom.xml.
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
....
</dependencies>