Table of Contents
- Getting Started With Jetty
- Introducing Jetty
- Using Jetty
- An Introduction to Jetty Configuration
- Jetty Configuration Guide
- Deploying to Jetty
- Configuring Contexts
- Configuring Jetty Connectors
- Configuring Security
- Configuring JSP Support
- Jetty Administration Guide
- Starting Jetty
- Session Management
- Session Architecture
- Session Components
- The SessionIdManager and the Housekeeper
- The L1 Session Cache
- Non-Persistent Sessions
- Persistent Sessions: File System
- Persistent Sessions: JDBC
- Persistent Sessions: MongoDB
- Persistent Sessions: Inifinspan
- Persistent Sessions: Hazelcast
- Persistent Sessions: Google Cloud DataStore
- Persistent Sessions: The L2 Session Data Cache
- Session Use Cases
- Jetty Logging
- Configuring JNDI
- Annotations
- Java Management Extensions (JMX)
- Application Layer Protocol Negotiation (ALPN)
- HTTP/2
- FastCGI Support
- Provided Servlets, Filters, and Handlers
- Jetty Runner
- Optimizing Jetty
- Jetty Development Guide
- Embedding
- HTTP Client
- Maven and Jetty
- Ant and Jetty
- Handlers
- WebSocket Introduction
- Jetty Websocket API
- Continuations
- Frameworks
- Jetty Reference Guide
- Architecture
- Platforms, Stacks and Alternative Distributions
- Jetty XML Reference
- Troubleshooting
- Debugging
- Contributing to Jetty
- Upgrading Jetty
Getting Started With Jetty
Introducing Jetty
What is Jetty?
Jetty is an open-source project providing an HTTP server, HTTP client, and javax.servlet container.
This guide is broken up in to five parts:
- The first section emphasizes beginning to use Jetty. It provides information about what Jetty is and where you can download it, and where to find Jetty in repositories like Central Maven. It also provides a Quick Start guide on how to get Jetty up and running as well as an overview of how and what to configure in Jetty.
- The second section of the guide deals with configuring Jetty at a more granular level. It explains how to use Jetty to deploy web applications, configure contexts and connects, and how to implement SSL and other security measures.
- Administration of Jetty is the focus of the third section of the guide. From server startup to session management, logging, HTTP/2 support and Jetty optimization, these chapters will help administrators get the most out of their Jetty server instances. This section also covers configuring many of the most common servlet container features such as JNDI and JMX.
- Aimed at advanced users of Jetty, the fourth section of the guide focuses on Jetty development. A large portion of this section is focused on using Jetty as an embedded server in existing applications. It contains several examples and how-to guides for making the most out of the Jetty framework. This section also includes a guide on using the Jetty Maven plugin as well as information on debugging Jetty.
- The final section of the guide is a reference section. Included there are guides on Jetty architecture and Jetty XML syntax, alternate distributions of Jetty and even troubleshooting of common issues. There is also a chapter on getting involved in the Jetty community including information on how to contribute code and how to find help.
Feedback is always welcome! Additionally, if you are interested in how to contribute to the open source project there is a section on that as well!
What Version Do I Use?
Jetty 9 is the most recent version of Jetty and has a great many improvements over previous versions. This documentation which focuses on Jetty 9. While many people continue to use older versions of Jetty, we generally recommend using Jetty 9 as it represents the version of Jetty that we will actively maintain and improve over the next few years.
Table 1. Jetty Versions | |||||||||
Version | Year | Home | Min JVM | Protocols | Servlet | JSP | Status | ||
It is important that only stable releases are used in production environments. Versions that have been deprecated or are released as Milestones (M) or Release Candidates (RC) are not suitable for production as they may contain security flaws or incomplete/non-functioning feature sets. | |||||||||
11 | 2020- | Eclipse | 11 (2) | HTTP/1.1 (RFC 7230), HTTP/2 (RFC 7540), WebSocket (RFC 6455, JSR 356), FastCGI, JakartaEE Namespace(1) | 5.0.0 | 3.0.0 | Stable | ||
10 | 2019- | Eclipse | 11 (2) | HTTP/1.1 (RFC 7230), HTTP/2 (RFC 7540), WebSocket (RFC 6455, JSR 356), FastCGI | 4.0.1 | 2.2 | Stable | ||
9.4 | 2016- | Eclipse | 1.8 | HTTP/1.1 (RFC 7230), HTTP/2 (RFC 7540), WebSocket (RFC 6455, JSR 356), FastCGI | 3.1 | 2.3 | Stable | ||
9.3 | 2015- | Eclipse | 1.8 (3) | HTTP/1.1 (RFC 7230), HTTP/2 (RFC 7540), WebSocket (RFC 6455, JSR 356), FastCGI | 3.1 | 2.3 | Deprecated / End of Life December 2020 | ||
9.2 | 2014-2018 | Eclipse | 1.7 (3) | HTTP/1.1 RFC2616, javax.websocket, SPDY v3 | 3.1 | 2.3 | Deprecated / End of Life January 2018 | ||
9.1 | 2013-2014 | Eclipse | 1.7 (3) | HTTP/1.1 RFC2616 | 3.1 | 2.3 | Deprecated / End of Life May 2014 | ||
9.0 | 2013-2013 | Eclipse | 1.7 (3) | HTTP/1.1 RFC2616 | 3.1-beta | 2.3 | Deprecated / End of Life November 2013 | ||
8 | 2009-2014 | Eclipse/Codehaus | 1.6 (3) | HTTP/1.1 RFC2616, WebSocket RFC 6455, SPDY v3 | 3.0 | 2.2 | Deprecated / End of Life November 2014 | ||
7 | 2008-2014 | Eclipse/Codehaus | 1.5 | HTTP/1.1 RFC2616, WebSocket RFC 6455, SPDY v3 | 2.5 | 2.1 | Deprecated / End of Life November 2014 | ||
6 | 2006-2010 | Codehaus | 1.4-1.5 | HTTP/1.1 RFC2616 | 2.5 | 2.0 | Deprecated / End of Life November 2010 | ||
5 | 2003-2009 | Sourceforge | 1.2-1.5 | HTTP/1.1 RFC2616 | 2.4 | 2.0 | Antique | ||
4 | 2001-2006 | Sourceforge | 1.2, J2ME | HTTP/1.1 RFC2616 | 2.3 | 1.2 | Ancient | ||
3 | 1999-2002 | Sourceforge | 1.2 | HTTP/1.1 RFC2068 | 2.2 | 1.1 | Fossilized | ||
2 | 1998-2000 | Mortbay | 1.1 | HTTP/1.0 RFC1945 | 2.1 | 1.0 | Legendary | ||
1 | 1995-1998 | Mortbay | 1.0 | HTTP/1.0 RFC1945 | - | - | Mythical | ||
- Due to Oracle’s ownership of the "Java" trademark, usage of the javax.* namespace has been restricted and the jakarta.* namespace was adopted by the Eclipse Foundation.
- JPMS module support is optional
- JDK9 and newer is not supported if using MultiRelease JAR Files, or Bytecode / Annotation scanning.