Loiane Groner, Brazilian, works as a Java/ Sencha evangelist. She has 7+ years of experience in web development. She is the ESJUG (Espirito Santo Java Users Group) and CampinasJUG (Campinas Java Users Group) leader and coordinator. Loiane is passionate about technology and programming. Also author of ExtJS 4 First Look book. Loiane is a DZone MVB and is not an employee of DZone and has posted 42 posts at DZone. You can read more from them at their website. View Full User Profile

Jetty and Eclipse Integration

07.31.2011
| 18066 views |
  • submit to reddit

This tutorial will walk you through out how to install Jetty on Eclipse, so you can run web applications on Jetty directly from Eclipse IDE.

As I mentioned on a previous post (Installing and running Jetty), I am trying to use Jetty instead of Tomcat. What I like about Tomcat is that Eclipse has native support to it. You can quickly go to the servers view and add a new Tomcat server instance in less than a minute. But Eclipse does not have native support to Jetty, and I did some research of how to do the same easy way with Jetty as well.

I found this plugin Run-Jetty-Run hosted on Google Code and it is very simple to use. So in this post I will show how to install it within Eclipse and in the next post I will show how it is easy to use.

There are two ways of installing a plugin on Eclipse now: using Eclipse Marketplace or the old way which is Install new Software.

Eclipse Marketplace

The link of Run-Jetty_run Plugin on Marketplace is: http://marketplace.eclipse.org/content/run-jetty-run

1 – Open Eclipse, go to the Help -> Eclipse Marketplace:

2 – Search for run-jetty-run and click on install:

3 – Confirm the installation of the plugin:

4 – Review and accept the licence and click on Finish:

5 – Wait while the plugin is being installed and then restart Eclipse.

Old way - Install new Software

1 – Open Eclipse, go to the Help -> Install new Software:

2 – Click on Add, then fill the form with Name:Jetty (or whatever you like) and Location: http://run-jetty-run.googlecode.com/svn/trunk/updatesite 

3 – Select the plugin and click on Next:

4 – Confirm the installation of the plugin:

5 – Review and accept the licence and click on Finish:

6 – Wait while the plugin is being installed and then restart Eclipse.

On next post, we will see how to use it.

Happy Coding! :)

 

From http://loianegroner.com/2011/07/jetty-and-eclipse-integration/

Published at DZone with permission of Loiane Groner, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Sebastien Guerlet replied on Mon, 2011/08/01 - 4:10am

IMHO it's better to use the official WTP integration of Jetty : http://wiki.eclipse.org/Jetty_WTP_Plugin

Tony Wang replied on Mon, 2011/08/01 - 11:05am

Hi , 
glad to know that you like the plugin, 
we just release Run-Jetty-Run 1.3 and add Jetty7/Jetty8 supprt and fixed some issues. :)

@Sebastien 

I think there's some benefits to use Run-Jetty-Run instead of WTP:
1.WTP always copy all the resource to temp folder , 
   that slow down the process and  you have to stop server then clean the resource sometimes when if the resource is locking.

2.For using WTP Jetty ,  you have to install Jetty_WTP_Plugin , then find a runtime for it , 
but actually when you use Run-Jetty-Run, you don't need any runtime .

There's already a built-in Jetty Runtime in the plug-in when you install the plugin, 
that save your time to configure it.

3.The maven support 
Since we use same project classpath with default Eclipse JDT , so we could support maven dependency management.  
(But it does not required to install a maven plug-in , it's optional.)

4.Easy to use Jetty for every Java project but also Dynamic Web Project.

In some case , like ZK component development  or some web widget development , it's also useful.


-----

That's also my first reason to use RJR , but once you use it , 
I am sure the great performance  will make you very impressive.

That's also the reason for me to join the project and contribute for it. :)

Sebastien Guerlet replied on Mon, 2011/08/01 - 11:15am in response to: Tony Wang

Thank you Tony for the detailed description of the benefits over the WTP integration (I must confess I'm always looking at "official" integration first and stick with it... maybe some bad habit !)
It makes me want to try it for sure !

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.