Question

I've had Jetty recommended as a good container for fast and simple development, in my case, Java Server Faces. I wish to use it with my Eclipse IDE (Version: 3.4.1), but quite frankly, can't figure out how.

I've tried various outdated plugins, only with large amounts of errors in return, so I'm hoping someone could guide me from downloading the right version to installing it, and being able to press "RUN", and see a simple Hello World in JSP/JSF work.

Cheers.

Was it helpful?

Solution

You could follow that tutorial from the eclipse help pages.

But check the version of your jetty. From this thread, V6 is recommended (V9 would work too, from Jacob's comment).

addprojectfacet.png

I believe the J2EE Preview server is hard coded to that internal Eclipse supplied version of Jetty.
However, you can execute "Window -> Preferences" and on the "Server -> Server Runtime Environments" page, click the Add button. Click the "Download additional server adapters" link and a dialog should appear and eventually list a Jetty Generic Server Adapter you can try.

OTHER TIPS

I use the Run Jetty Run plugin. Its very simple and easy to use

I have followed the below steps to set up Jetty server in my eclipse:

(1) Download the 'net.sourceforge.eclipsejetty.launcher' jar (plugin) from the below URL: http://sourceforge.net/projects/eclipse-jetty/

(2) Copy the downloaded jar file to your eclipse 'plugins' folder (Example: C:\eclipse-jee-luna\plugins)

(3) Restart Eclipse

(4) Go to Eclipse Workspace -> Right click on your web project -> Run -> Run Configurations -> Jetty Web App -> Set the 'WebApp Directory' -> Click on Run

enter image description here

After following the above steps, I am able to successfully deploy & run my web project using Jetty Server in Eclipse.

I hope this is helpful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top