Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

jetty/jetty.project

Developer Tools

A lightweight Java web server and servlet engine that can run standalone or be embedded in applications.

4,096
2,033
Java
NOASSERTION
15 years old

Project overview

Eclipse Jetty is a lightweight, asynchronous Java web server and Servlet engine. It implements HTTP/1, HTTP/2, HTTP/3, WebSocket and related protocols, with the stated goal of high-volume, low-latency serving while remaining compatible with long-standing Servlet development practices. It can be used in two main ways: as a traditional standalone server that deploys WAR files, or as a component embedded directly in a Java application.

It is aimed at Java developers building web applications or services, and at operators who deploy webapps to a Jetty distribution. The documented material is split by use case: an Operations Guide for standalone installation and deployment, a Programming Guide for embedding Jetty libraries, and a Contribution Guide for working on the project itself (documentation, Operations Guide, Programming Guide).

Quick start

A minimal standalone deployment requires a Jetty home with start.jar, a Java runtime and a built WAR file. From an empty base directory, add the HTTP and Jakarta EE 11 deployment modules, place the WAR in webapps/, then start Jetty:

mkdir jetty-base && cd jetty-base
java -jar $JETTY_HOME/start.jar --add-modules=http,ee11-deploy
cp ~/src/myproj/target/mywebapp.war webapps
java -jar $JETTY_HOME/start.jar

The --add-modules step generates the base configuration; after start.jar runs, Jetty serves the deployed webapp. To deploy webapps for different Servlet environments side by side, add ee8-deploy as an additional module and place an environment: ee8 properties file next to the older webapp (webapp example, multi-version example).

For embedding, Jetty can be started programmatically by constructing a Server, setting a handler, and calling start():

Server server = new Server(port);
server.setHandler(new MyHandler());
server.start();

A Servlet context can be mounted the same way with ServletContextHandler and addServlet() (embedded examples, embedded Servlet example). Building the project from source uses Maven: clone the repository and run mvn -Pfast clean install, where the fast profile skips tests and other checks (build instructions).

Usage constraints

Standalone use assumes a Java runtime and a Jetty distribution containing start.jar; the module names (http, ee11-deploy, ee8-deploy) determine which deployment capabilities are enabled. Embedding requires the Jetty libraries on the application classpath. The repository does not state a license identifier in its GitHub metadata, so check the project's licensing terms before redistribution or commercial use. Production support is offered separately by Webtide (commercial support).

HotRepo's take

The project appeared on the Java daily list on 2026-11-06 at position 21 with no recorded star change that day, so the visible HotRepo record reflects a placement rather than sustained growth. With a long history since 2011 and an established position as an embeddable Java server, its relevance here rests on the breadth of protocol support and the split between standalone deployment and embedded use, not on short-term momentum.

Written by AI from the project's README, updated . The project's own docs are the source of truth.