Use Maven in eclipse to create a web project, eclipsemaven
Use Maven to create a web project in eclipse:
Method 1:
Right-click to create a maven project and select create simple project.
Enter the information. Note that the packaging method should be changed to war.
Click Finish. The created project directory is as follows:
There is no WEB-INF directory in the project, let eclipse help us complete:
Right-click the project name, select properties, and find the corresponding location. Set Dynamic Web Moudle version to 3.0, deselect this option, and select the application. The following prompt is displayed:
Click the Content to change the default Content directory to OK.
Method 2:
Create a new project, but do not check create simple project, search for web, select this option, Next
Enter the information to complete. The java and test directories cannot be found in the project directory.
You only need to change the jre library to your own.
The disadvantage of this method is that you cannot change the web Project version as in the first method. The default value is 2.3, which does not support jstl and needs to be changed manually:
Modify web. xml and copy a new web3.0 header to overwrite the original one.
Change the file in. setting to 2.3.
The preceding two methods are used to create a web project using Maven in eclipse. If there is any incorrect or simpler method, please advise.