Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installation of Jetty into Eclipse

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.

like image 462
Claus Jørgensen Avatar asked Jun 20 '09 17:06

Claus Jørgensen


People also ask

How do you stop a Jetty server in Eclipse?

BTW, as to your question in title: mvn jetty:stop fails for you (see also manual for stopPort and stopKey )? By the way. I solved my problem. after a little searching i got run-jetty-run (code.google.com/p/run-jetty-run) for eclipse.

What is org eclipse jetty?

The Eclipse Jetty Project Jetty provides a web server and servlet container, additionally providing support for HTTP/2, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. These components are open source and are freely available for commercial use and distribution.


2 Answers

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

like image 129
Jherico Avatar answered Oct 07 '22 20:10

Jherico


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.

like image 33
VonC Avatar answered Oct 07 '22 20:10

VonC