What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To install and run Jetty 12, download and unpack the Jetty Home archive, create a separate Jetty Base, enable the modules your application needs, and start the server with Java 17. For a standalone server, deploy a WAR in the base directory’s webapps folder. For local development, you can run an unassembled web application with Jetty’s Maven plugin; Maven is not required to run Jetty itself.

Choose a Jetty branch and check Java compatibility

The official Jetty version table lists Java 17 for Jetty 12.0.x and 12.1.x. It labels 12.0.x stable and 12.1.x development, so check the current [Jetty version documentation](https://jetty.org/docs/) and [download page](https://jetty.org/download.html) before choosing a branch: release and support status can change. The Eclipse Jetty Project recommends Jetty 12, while noting that some users remain on older versions for reasons such as Java-version requirements.

Jetty 12 supports multiple web-application environments. Choose a deployment module that matches the application’s Servlet/Jakarta EE generation and package namespace; an EE8, EE9, EE10, or EE11 application is not automatically interchangeable with another environment. The Jetty 12.0 operations guide covers EE8, EE9, and EE10 deployment, while Jetty 12.1 documentation also covers EE11. Check the [Jetty 12.0 operations guide](https://jetty.org/docs/jetty/12/operations-guide/) or the documentation for your chosen branch.

Install Jetty as a standalone server

Unpack Jetty Home and create Jetty Base

Download the Jetty Home distribution archive from the [official Jetty downloads page](https://jetty.org/download.html) and unpack it. The unpacked distribution is JETTY_HOME; keep it unmodified. Put configuration and deployed applications in a separate JETTY_BASE, which can be created for each server configuration. The operations guide notes that ZIP is typically convenient on Windows and gzip on other operating systems.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable modules before starting

A new base needs enabled modules. The following example creates an HTTP server base configured for an EE10 deployment. Replace the paths with the locations where you unpacked Jetty and want the base:

export JETTY_HOME=/path/to/jetty-home
export JETTY_BASE=/path/to/jetty-base
mkdir -p "$JETTY_BASE"
cd "$JETTY_BASE"
java -jar "$JETTY_HOME/start.jar" --add-modules=http,ee10-deploy
java -jar "$JETTY_HOME/start.jar"

Run these commands with Java 17 for the Jetty 12 branches described above. The http module enables the HTTP connector; ee10-deploy enables deployment for the EE10 environment. Substitute the matching deployment module if your application uses a different supported environment. Starting from an empty base without enabling any modules produces the error No enabled jetty modules found!.

The guide’s example listens on port 8080, but that port may already be in use or may not suit your environment. Stop the foreground server with Ctrl+C.

Deploy a WAR file

  1. In the chosen JETTY_BASE, enable the deployment module for the WAR’s environment. For an EE10 WAR, the example command is java -jar "$JETTY_HOME/start.jar" --add-modules=http,ee10-deploy. Use the module appropriate to the application’s Servlet/Jakarta EE generation and Jetty branch.
  2. Copy the WAR into $JETTY_BASE/webapps.
  3. Start Jetty from that base with java -jar "$JETTY_HOME/start.jar".

Deployment scanning is static by default: the scan interval is zero, so changes to web application files require stopping and restarting Jetty. To have the deployment manager notice added, changed, and removed webapp files, set jetty.deploy.scanInterval to one second or more. See the [Jetty deployment documentation](https://jetty.org/docs/jetty/12/operations-guide/deploy/) for the branch-specific configuration details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand a 404 after startup

A 404 does not necessarily mean Jetty failed to start. The server can be listening successfully while no deployed web application matches the requested URL. Confirm that the HTTP module is enabled, that the WAR is in the base directory’s webapps folder, and that its deployment module matches its environment.

Run an application with Maven during development

For local development, Jetty’s Maven plugin can run an unassembled web application from the project root. Since Jetty 12, the plugin is repackaged for the corresponding EE version, so use the plugin coordinates and current version matching your application environment. From the project root, run:

mvn jetty:run

The official example serves the application at http://localhost:8080/. The goal keeps Maven in the foreground, streams output to the console, and stops when Jetty exits. Consult the [Jetty Maven plugin documentation](https://jetty.org/docs/jetty/12/programming-guide/tools/maven-plugin.html) for setup and environment-specific coordinates.

Jetty presents the Maven plugin as a development and testing tool, not its production recommendation. For production, use the distribution deployment approach or embedded Jetty. Maven is optional: a project can use another build tool or manage its implementation as it sees fit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the right way to run Jetty

Route Best fit What it runs Process behavior
Standalone distribution Server deployment and operations A configured Jetty Base; deploy an assembled WAR in webapps Start Jetty directly with start.jar; configuration stays separate from Jetty Home
Maven plugin Local development and testing An unassembled web application from the project root mvn jetty:run runs in the foreground and streams output to the console
Embedded Jetty Production deployment alternative named in Jetty guidance Jetty integrated into an application Not specified in the cited setup guidance

For a standalone server, select the deployment module by the application’s environment, then decide whether explicit restarts or automatic file-change detection better fit your operations. For iterative development, the Maven plugin avoids assembling a WAR for each run.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.