mac环境下:
Configuring the Tomcat server in IntelliJ IDEA
1.Open the Settings / Preferences Dialog by pressing ⌘,and click Application Servers under Build, Execution, Deployment.
image.png
2.On the [Application Servers], click"+" above the central pane and choose Tomcat Serverfrom the list.
3.In the right-hand pane, specify the Tomcat installation folder in the Tomcat Home field. Type the path to it manually or click/help/img/idea/2017.1/browseButton.png
and choose the installation folder in the dialog box that opens. IntelliJ IDEA detects the version of the application server and automatically fills in the Name field as follows:GlassFish <version>.
image.png