The premise of creating a Web project and integrating Tomcat into IDEA is that your Tomcat can be opened normally.
Create a web project with IDEA
1. Select Create New Project to create a project, and then operate as shown below.
2. After clicking next, it is time to name the project and select the storage location.
3. After writing, the next step is to create a Web project, as shown below.
Integrate Tomcat into IDEA
1. Find Run in the upper column , click to open and find Edit Configurations (Edit Configurations), and then click, as shown in the figure below.
2. Click the + in the upper left corner , find Tomcat Server down , click to open, select Local , (if you can't find it, click the last line and show more lines), you can configure Tomcat, as shown below.
3. Configure tomcat and browser
Click Configure , a box will come out, click the folder behind, select your Tomcat in the local location, and then click OK, as shown in the figure below.
4. After the browser is also selected, you can click Apply in the lower right corner , and then click OK, the page is automatically closed.
Put the project in.
First of all
then
After clicking the + sign, the following figure appears, select Artifact , find your project, and select.
The following picture will appear.
Then click Apply, and click OK to complete.