IntelliJ IDEA Ultimate comes with out-of-the-box support for the most popular enterprise and open-source application servers including GlassFish, WebLogic, JBoss EAP, Wildfly, WebSphere, Tomcat, TomEE, Jetty, Geronimo, Resin and Virgo.
1. Application servers
To configure a server in the IDE, go to
→ and click the button. The IDE will automatically detect its version and offer you to select which libraries to add to the dependencies when the server is used in the project.

2. Web facet
One important thing when working with an application server is the
. This is where the IDE stores the web settings for each module of your project. These settings include the deployment descriptors and web resources roots, and are available in → and → .

Usually you don’t need to configure the
manually. The IDE automatically detects the descriptors and web resource roots and offers to configure it.
3. Artifacts
An artifact is what the IDE deploys to a server when you run the application via
. Each artifact has its name, type, output directory, layout and type (, Web Application: Exploded |
, , EJB Application: Exploded |
, etc). To configure the artifacts, go to → .

If you use
or , you don’t need to configure the artifacts manually. The IDE automatically synchronizes them with the artifacts defined in your build files.
4. Run configurations
A
defines how the artifacts are deployed to the server. IntelliJ IDEA has two types of Run configurations: and . The run configuration starts a new instance of the server and deploy artifacts there. The run configuration deploys the artifacts to an already running standalone server.

Each application server may have a different set of parameters in a
.

One important parameter here is
, which defines how to update the application when you use the action via + (+ for Mac). Based on your choice, the IDE can , update classes and resources |
, or or . Turn off the checkbox if you don’t like to see the dialog each time you update the application. This is a great time-saver when you update your application very frequently.
Another important parameter is the
, which defines how to update the application when you switch from the IDE, say to a browser. Based on these settings, the IDE can , update classes and resources |
, or . This setting may be very useful when you’d like to have your application updated automatically each time when you switch to a browser.
Keep in mind that update resources and update classes and resources options are available only for the
artifact type. For the artifact type use the common .
By default, the IDE runs the application server using the project JRE. However, you can always choose to use an alternative JRE.
An essential part of any Run configuration is the artifacts deployment.

By default, the IDE automatically builds the artifacts before deploying. However you can change it using the
group in the dialog.
A
run configuration has additional parameters such as the host/port of the server you’d like to deploy your artifacts to.

5. Run and debug application
Once a
is created, you can run or debug your application via the , menu or the shortcuts: via + , via + .

6. Update and HotSwap
When you need to apply changes in the code to a running application, we recommend using the
action via + ( + for Mac). As mentioned above, the action is only available for the artifact type. Based on your choice, it can or update classes and resources |
. When the action is applied in the mode, it uses the ; otherwise, it uses the .
If you use the
artifact type you can only rely on the , which is done automatically when you are in the mode.
7. Build artifacts
You can always ask the IDE to build your artifacts on via the
→ action.

8. Application servers tool window
Each
is shown in the tool window, along with the server and artifacts state. This tool window also helps you easily / the server and // artifacts.
