Tips & Tricks

30 Days with IntelliJ IDEA. Application Servers

Last year was so busy with conferences and the major release of v13 that at some point we stopped publishing new articles from the 30 Day Guide. But we’re back on track now! The new year always means new tips and tricks for your favorite IDE. The good news is that the new article is already awaiting for you, this time on how to work with application servers.

It no secret that IntelliJ IDEA comes with out-of-the-box support for enterprise and open-source application servers including GlassFish, WebLogic, JBoss EAP, Wildfly, WebSphere, Tomcat, TomEE, Jetty, Geronimo, Resin and Virgo. The IDE helps configure and manage servers, deploy and undeploy artifacts and of course debug running applications.

Did you know?

IntelliJ IDEA provides an easy way to apply changes to a running application without restarting or redeployment. As you may have noticed before, one of the parameters in the Run configuration dialog is the On ‘update’ action. This action defines how to update the application when you use the Update action via Ctrl + F10 (Cmd+ F10 for Mac).

Based on your choice, the IDE can update resources, update classes and resources, redeploy or restart the server. Turn off the Show dialog 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.

One more important parameter the Run configuration dialog is On frame deactivation. It defines how to update the application when you switch from the IDE, say to a browser. Based on these settings, the IDE can update resources, update classes and resources, or do nothing. This setting may be very useful when you’d like to have your application updated automatically each time when you switch to a browser.

Read the complete article to other tricky aspects of how to work with application servers in IntelliJ IDEA.

More interesting articles are coming soon! Let us know if you’d like us to cover a specific topic.

Develop with Pleasure!

Comments below can no longer be edited.

10 Responses to 30 Days with IntelliJ IDEA. Application Servers

  1. Avatar

    Zootropo says:

    January 20, 2014

    How does this compare with something like JRebel? Do you have any benchmarks?

    Keep up the good work, guys!

    • Avatar

      Issam says:

      January 21, 2014

      Without restarting server, without redeploying, without use of JRebel you are only limited to the modification of method bodies in classes, or somes resources like jsp, html, css…

      JRebel go behind this and add the possibility to see changes witht redeploy without restart, for example add a method to a class, change spring configuration and other change will take plce directy without restart.

      Intellij and JRebel work fine together, you are more productive with both, it’s not intellij limitation, but jvm Hot swap limitation.

  2. Avatar

    Alex says:

    January 20, 2014

    Honestly.. I don’t use Intellij at all because of default shortcuts 🙂
    If the shortcuts would be clearer it would be perfect.. Because I am with my hand on my keyboard all the time I want to use my control+letter to do something and not F5 or F6… I am not looking at my keyboard and those F’s are hard to type… I don’t know where F10 is with my eyes closed but having control as reference I can tell where any letter is… or number… (numbers are difficult also to type)

    • Avatar

      Andrey Cheptsov says:

      January 22, 2014

      You can always re-assign the shortcuts.

  3. Avatar

    Hesam says:

    January 22, 2014

    Thanks Andrey,

    I have two questions:
    1- Is it possible to have both Android app and GAE app together?
    2- Is it possible to connect GAE Datastore to Data Source (Database) of IntelliJ Idea? I guess it’s nice feature if you can add it in future (or maybe you surprise me if it’s available).

    Jetbrains is amazing…

    • Avatar

      Andrey Cheptsov says:

      January 22, 2014

      Hi Hesam,

      1. What you mean by having both Android app and GAE app together?
      2. Google Datastore is not JDBC-compatible (due its NoSQL nature), so it’s not possible. Maybe some day when we introduce NoSQL data access tools… 🙂 However now you can connect easily to Google Cloud SQL.

      And thanks you!

  4. Avatar

    Volodymyr says:

    February 2, 2014

    Thanks for the great post, Andrey!

    Can you explain the mechanics behind updating the classes and resources? How does it work in Apache Tomcat for example?

    I’m asking this questions because after reading the complete article I didn’t understand this statement: “When the Update action is applied in the Debug mode, it uses the HotSwap; otherwise, it uses the Hot redeployment.”. Does it mean that in Debug mode only classes can be updated?

    • Avatar

      Andrey Cheptsov says:

      February 3, 2014

      Yes, this was written a bit incorrectly. HotSwap for updating classes and Hot Redeploy for updating resources

      • Avatar

        Volodymyr says:

        February 3, 2014

        Thanks for the clarification!

  5. Avatar

    Premnath says:

    February 12, 2015

    Thanks for the post Andrey!!

    Is it a normal behaviour for intellij with Websphere8 to redeploy on update resources on frame deactivation. It is very annoying that every time something changed in a java class it redeploys and kills the session there by

Discover more