Running a Web Application on Jetty Webserver from Eclipse IDE
This tutorial will walk you through how to run a web application on Jetty webserver directly from Eclipse.
Join the DZone community and get the full member experience.Join For Free
1 – Create a Dynamic Web Project (you can right click on the Project Explorer view or go to File -> New…):
2 – Give a name to the project and click on Next:
3 – Click on Next:
4 – Check the option Generate web.xml… and click on Finish:
5 – This is how the project will look like:
6 – Select the project and click on Run Button -> Run Configurations…
7 – Double click on Jetty Webapp. It will create a jetty project configuration under the Jetty Webapp with the project name. Click on Run:
8 – Wait for the server to start:
9 – Test your application!
I also recorded a video with the steps above:
See? It is very simple!
The sample project source code is also available on my github: https://github.com/loiane/test-jetty>
Opinions expressed by DZone contributors are their own.