Jetty is a pure Java-based HTTP server and Java Servlet container. These components are open source and available for commercial use and distribution.
Jetty's main selling point is how simple it is to get up and running as well as being very flexible in how it is utilized.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Simplicity
Because Jetty is built by an assembly of simple components it is very easy to work with. Where possible, features are added by aggregation of components rather than creation of complex deep/optional APIs
Assembly and configuration can be done by the java API, the jetty XML configuration file, which is an IOC style mapping of XML to POJO APIs, other IOC/component frameworks such as Spring and Plexus, OSGi activators, and other XML to POJO mappings such as XBeans
All APIs are public which has resulted in all of the Jetty code being very well maintained and easily understood.
Pro Embedded mode
A Jetty instance can be spawned entirely from Java code (without an external installation or config files), making it a very handy companion for unit/integration tests, conditional/temporary server spawning, and the like.
Pro Flexibility
Jetty was not designed to be an application server, rather it was built from the ground up to be a collection of components that provide HTTP and servlet services. This results in Jetty being very flexible as well as the following benefits:
- Very simple to extend and/or replace components with customized behavior.
- The integration of Jetty into development tools like maven can be very flexible as the components that control the layout of a webapp can be updated to run an unassembled application from source rather than an assembled WAR.
- Very easy to remove features that are not being used to save on memory and CPU costs.
Due to this flexibility Jetty can be used in the following use cases:
- A stand-alone traditional web server for static and dynamic content
- A dynamic content server behind a dedicated HTTP server such as Apache using mod_proxy or mod_jk
- An embedded component within a java application
- As a component to build an application server or Java EE server
For a full list of software powered by Jetty go here.