Create a MAVEN Web project
Create a new MAVEN project in Eclipse
Select the project type and select Maven-archetype-webapp in the Artifact ID
Enter the Group ID and Artifact ID as well as the Package,group ID to write a large project name, Artifact ID is a subproject name, the package is the default for you to build a bag, you can not write
The file structure of the newly created document is as follows
Added Src/test/java directory, which is used to write service-side test code
With the above steps, a basic MAVEN Web project structure is created.
Troubleshooting Project Issues
The index.jsp file created by default is reported with the following error: The superclass "Javax.servlet.http.HttpServlet" is not found on the Java Build Path
Right-click Web Project-"Properties or Build path-" Java build path->libraries-> Add libray ...
Select MyEclipse Server Library
Select the corresponding version of the Tomcat Runtime Library
Go back to order and Export in the Java Build path interface and tick the Tomcat Runtime Library that you just configured, so you can solve the above error problem.
Maven Web project compilation release test
Compile the project
After the Maven install compilation command is executed, the corresponding file is generated, and any of the red boxes that are published by Tomcat can be
Access the test-deployed project and output the contents of the page normally.
Java Web Learning Series--myeclipse for spring using MAVEN to create a Web project