because Maven was used in the project, I had to learn maven, and here's how to use MAVEN to build a Web project in EclipseNot much nonsense to go straight to the point:
1: Create a new MAVEN project
Then select the work path
Click Next to select WebApp
Click Next to write the Group ID, artifact ID, and package,package to create a package by default, not to write or
The new success directory structure is as follows: Perspective Java EE mode
Remember the right key project Properties->java build path->libraries Remove the old JDK and add the JDK installed on the local computer in the Add library.
Properties->java compiler modify the corresponding JDK version number.
The error of the project here is that the Javax.servlet-api.jar package required by JSP has not been introduced.
, here teaches you how to lead the jar pack; The Central Library address on MAVEN's web http://mvnrepository.com/search for the jar content you need
and find the appropriate content.
Copy the following code and add it to pom.xml.
Configuration item: You need to add Src/main/java,src/test/java, src/test/resources three folders. Right key item root directory Click New-> Source folder, build these three folders
Note: Instead of building a normal folder, source folder
Publish right-click on the project: Run as->maven install then run as-> mavenpackage. Run with Tomcat after the build