Create a JavaWeb project

  1. Create a project

    1. The first step

    2. The second step

    3. The third step

      To change the JavaEE version, follow the following figure

  1. The fourth step

2. Release engineering

  1. The first step

  2. The second step

  3. The third step

    Click the button in the image below to add a Tomcat environment





    You can also click the Fix button in the bottom right corner and select the option that ends with War Exploded

  4. The fourth step

    Note:

    IDEA does not generate a path for a project when it is deployed.

    This project named javaweb, for example, a page for the index, HTML, according to the rule, the access path should be http://localhost:8080/javaweb/index.html. But after deployment in the IDEA, the access path to http://localhost:8080/index.html. To change the access path to the first one, manually change the path as shown in the following figure.

  5. Step 5

    Modify as shown in the following figure. If the configuration is not as shown below, we need to restart the server every time we modify the page to see the latest effect… After modification, you can see the latest effect without restarting the server.

  6. Step 6

    Click button 1 below to start the server. Click button 2 to start the server in Debug mode

3. Add third-party jars

Create a folder lib in the WEB-INF folder





2) the second step

Select Project Structure (Ctrl+Alt+Shift+ S) as shown below



3) the third step

Make the selection as shown below



The fourth step 4)

Select the lib directory you just created and click OK



5) step 5

Select Jar Directory and click OK, then OK again



6) step 6

Perform the configuration as shown in the following figure. After the configuration is successful, you can use the third-party Jar stored in the lib directory