This feature is supported in the Ultimate edition only.
To define a server in IntelliJ IDEA, in most of the cases, all you have to do is to specify where the corresponding server is installed.
You can define a server:
- Separately, in the Settings dialog: Ctrl+Alt+S | Build, Execution, Deployment | Application Servers | , etc.
- When creating a project or module.
- When creating a server run/debug configuration: Run | Edit Configurations | | <Server Name>, etc.
In this section:
- Defining a server in the Settings dialog
- Defining a server when creating a project or module
- Defining a server when creating a run/debug configuration
Defining a server in the Settings dialog
- Open the Settings dialog (e.g. Ctrl+Alt+S).
- In the left-hand pane, in the Build, Execution, Deployment category, select Application Servers.
- On the Application Servers page that opens in the right-hand part of the dialog, click . (Alternatively, press Alt+Insert.)
- Select the server that you are going to use.
- In the dialog that opens, specify the server settings and click OK. For most of the servers, you have to specify just the server home, i.e. the server installation directory. For more information, see Application Servers.
- Click OK in the Settings
Defining a server when creating a project or module
- Do one of the following:
- If you are going to create a new project: click Create New Project on the Welcome screen or select File | New | Project. As a result, the New Project wizard opens.
- If you are going to add a module to an existing project: open the project you want to add a module to, and select File | New | Module. As a result, the New Module wizard opens.
- On the first page of the wizard, in the left-hand pane, select Java Enterprise.
- In the right-hand part of the page, to the right of the Application Server field, click New.
- Select the server that you are going to use.
- In the dialog that opens, specify the server settings and click OK. For most of the servers, you have to specify just the server home, i.e. the server installation directory.
- Specify other settings as necessary and click Next. For more information, see Project Category and Options or Module Category and Options.
- Specify the name and location settings and click Finish. For more information, see Project Name and Location or Module Name and Location.
Defining a server when creating a run/debug configuration
- Open the Run/Debug Configurations dialog (e.g. Run | Edit Configurations).
- Click (Alt+Insert), select the server of interest (e.g. Tomcat Server) and, if available, select Local or Remote.
- In the right-hand part of the dialog, on the Server tab, click Configure to the right of the Application server
- In the dialog that opens specify the server settings and click OK.
- Specify other run/debug configuration settings as necessary and click OK.