...
2. Select application server
Before you configure the libraries, you need to select an application server where to which you'd like to deploy ll be deploying your application. If there is no application press yet, click
button to configure one.

If you'd like re going to deploy your application to several multiple application servers, you can configure them later via
→
.
3. Select JSF library
If the application is going to use using the JSF library, please select the corresponding item in the list. By default the IDE will use the library IntelliJ IDEA uses libraries provided by the selected application server.
Notice
that you can select the library from the list or even have it download and configured automaticallyLibrary you selected is automatically downloaded and configured (if required), by IntelliJ IDEA.
4. Configure other libraries
Now you can select other libraries which you'd like to use in for use with your application: Bean Validation, CDI, JSON Processing, WebSockets, RESTful Web Services (JAX-RS), WebSockets and others, you name it.

When After you press click
the IDE will create the , IntelliJ IDEA creates the project.

6. Check module dependencies
To make sure the that libraries are properly configured correctly you can , go to the
→
→
.
Here There you can
add additional libraries which you'd like to use in your applicationreview and modify the list of libraries as you see fit.

7. Check web settings
To make sure web check the Web descriptor and web resources directory are configured correctly you can configuration, go to
→
. Here you can and configure
additional descriptors (e.g.
specific to application server
specific)
and , or change
web Web resource directories.

These settings will be used to build artifacts.
8. Check configured artifacts
An artifact is what the IDE will deploy to the IntelliJ IDEA deploys to application server when you run the your application server. To make sure the that artifacts are properly configured correctly you can , go to
→
.

Here This dialog lets you can change existing artifacts, or add new ones.
9. Check run configuration
And finally before we run One last step before running the application we can go to is to make sure that its Run Configuration is all right. For that, see
→
and make sure the run configuration is correct.
A run configuration is what Run Configuration defines how the application server is configured , how to deploy the application, etcand controls application deployment.

10. Check artifacts to deploy
If you go to
tab
lets you
'll be able to choose
the what artifacts to deploy,
redeploy and undeploy when you perform the corresponding operations for this run update or remove from application server when you run this configuration.

11. Run application
When the run configuration is configured correctly we can run itAssuming that everything is set right, we can try running our application.

When the application is deployed to the server the IDE will open the page specified in the run configuration.selected server, IntelliJ IDEA opens it start page (can also be changed in Run Configuration settings.)

12. Live edit
Additionally In addition to the server-side debugging tools toolsб IntelliJ IDEA provides the
feature
. This feature , which helps you debug
web pages via browser. To start debugging a web page just use applications directly in your Web browser. This is very simple, really: after you installed (browser helper plugin), just use the from the
browser context menu
on this page.

Make sure you have installed the corresponding Chrome extension before using
.If the extension is installed the IDE will open the web page in the browser and will warn that it's connected to the IDEIntelliJ IDEA opens application page in your Web browser and warns that it's now available for live editing.

Now you can see the DOM structure of your application page right in the IDE. ANother important feature of the Live Edit is that it can deploy the changes you apply to the page to the server immediately as you type, so you don't even need to refresh the browserdirectly in IntelliJ IDEA, and, which is what's so cool about Live Edit, deploy them to the server as you type, so everything is synced without a single restart.

Try to change something make some changes on the page, and you'll the see that browser displays them immediately.
...
Now let's create some server code and try to debug debugging it.

14. Update application
When the application is running, we can use the
action via
to choose
the way how to redeploy
the applicationit.

15. Debug application
When we run an application in the In debug mode the IDE IntelliJ IDEA stops at breakpoints .(well, what else would it do, right?)

15. Update resources on frame deactivation
Notice Note that you can specify the way how the application is redeployed on application redeployment settings on the
Update span |
. This option tab, which is available in the dialog.
One more useful option here is
span |
---|
|
On frame deactivation |
,
where you can specify what to do when the focus leave the IDE window. For instance you can specify to redeploy resources when you switch from the IDE to the browser. It's helps you redeploy changes to the application server quickerwhich controls what happens when IntelliJ IDEA window loses focus. If you choose to redeploy resources at that moment, then, for example, switching from IntelliJ IDEA to Web browser would trigger this action, and by the time you hit Refresh, the application will already have been updated on server, allowing you to see all the changes you made in action much quicker than otherwise.

16. Configure application servers
In this tutorial we used GlassFish 4.0. However Of course, you can easily configure any other application servers server of your choice via
→
.
...