Setting up Jetty with IntelliJ IDEA

I wrote this in November of last year, I didn’t have time to share it :(.

  1. Download lastest Jetty stable version here
  2. Uncompress it (tar -zxvf jetty-distribution-9.1.0.v20131115.tar.gz)
  3. cd jetty-distribution-9.1.0.v20131115/
  4. Add the –module=jmx to start.ini archive (echo –module=jmx >> start.ini)
  5. Setup  the Default Jetty Server Local configuration
  6. Click configure and add the path to the folder you just uncompressed

  7. Click Ok and put the following:

    VM Options: -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

    Jetty Server Settings: select etc/jetty-jmx.xml and etc/jetty.xml

  8. Now just add your new Jetty configuration, for that just click on the plus sign

    and search for Jetty Server Local

  9. Go to deployment tab and add your war(s) file(s)
    step5
  10. Add the path you want to use
  11. Add the name you want
    step7
  12. Click ok

That’s all, hope this is useful!

Advertisements

Setting up Tomcat 7 with IntelliJ IDEA

I have been doing a java project with IntelliJ IDEA. It is a quite normal IDE, with some supposed advantages over Eclipse. I got used to it in two weeks. 

So i’ll to explain how to run a project with Tomcat 7.

  1. Download the core version of Tomcat 7 here. DO NOT INSTALL IT WITH APT-GET OR ANY PACKAGE MANAGER
  2. Uncompress the folder anywhere you want
  3. Click on Run -> Edit Configurations…
    Search on the left for Tomcat Server and select Local

  4. Click Configure

  5. In the name put Tomcat 7
    Tomcat Home and Tomcat base directory are the folder you created in step 2

  6. Click Ok
    Set Startup page: http://localhost:8081/, HTTP port: 8081
    You can change this values to any you want

  7. Click on Run -> Edit Configurations…
    Click on the + sign 

  8. Select Tomcat Server Local
    Go to Deployment tab

  9. Click on the + sign, select artifact you want to add to the server (in the picture i added one called dsp-api.war)
    Click Ok

  10. That’s all run and test your application 🙂