There are two ways to create a MAVEN project for the Java Web, first to create a MAVEN project, then to select the JDK and Dynamic Web Runtime environment, and to create a Java project and convert it into a MAVEN project
1. How to convert a common Java project into a MAVEN project:
Right-click Project-Configure, Convert to Maven Product, and the M flag appears on the project to indicate that it is a Maven project. You may need to change the JDK version as well as the Pom.xml file after converting to maven configuration.
2. Or create a MAVEN project directly, and then right-click the project, Properties, Product Facets, tick dynamic Web Module + Java, and select Runtimes
3. Create the pom.xml manually under the Java project and execute it at the command line: MVN eclipse:eclipse create Eclipse Project
Reference: http://czj4451.iteye.com/blog/1983889
http://blog.csdn.net/qjyong/article/details/9098213
http://www.yiibai.com/maven/
http://cloudera.iteye.com/blog/424795
Create a MAVEN project