1. Select the web project and press F4 to open the project configuration
2. Configure modules, click the plus sign above, add or import a new project.
3. Configure Artifacts
3. Configure tomcat
Click on the arrow.
After the above steps are configured, start tomcat.