Jetty Logo
Version: 9.0.6.v20130930
Contact the core Jetty developers at

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

Jetty : The Definitive Reference

Revision History
Revision 9.0.6.v20130930 2013-10-30 13:20:11

This documentation is produced and contributed to under the EPL.

Table of Contents

I. Quick Start Guide
1. Introducing Jetty
What is Jetty?
What Version Do I Use?
Jetty and Java EE Web Profile
2. Quick Start Jetty
Downloading Jetty
Running Jetty
Deploying Web Applications
Finding in Maven
3. Quick Start Configuration
How to Configure Jetty
What to Configure in Jetty
Temporary Directories
II. Jetty Configuration Guide
4. Configuring Jetty Connectors
Connector Configuration Overview
Configuring SSL
Setting Port 80 Access for a Non-Root User
5. Configuring Contexts
Setting a Context Path
Configuring Virtual Hosts
Configuring WebAppContexts
Serving a WebApp from a Particular Port/Connector
Creating Custom Error Pages
Setting Max Form Size
6. Configuring Security
Limiting Form Content
Aliased Files and Symbolic links
Secure Password Obfuscation
JAAS Support
Spnego Support
7. Deploying to Jetty
Anatomy of a Web Application
Automatic Web Application Deployment
Configuring a Specific Web Application Deployment
Configuring Static Content Deployment
Hot Deployment
Deployment Architecture
Overlay WebApp Deployer
8. Configuring JSP Support
Configuring JSP
9. Jetty Logging
Configuring Jetty Logging
Configuring Jetty Request Logs
Example: Logging with Apache Log4j
Example: Logging with Java's java.util.logging
Example: Logging with Logback
Example: Capturing Multiple Logging frameworks with Slf4j
Example: Centralized Logging with Logback
Jetty Dump Tool
III. Advanced Topics Guide
10. Debugging
Enable remote debugging
Debugging With Eclipse
Debugging With IntelliJ
11. Session Management
Setting Session Characteristics
Using Persistent Sessions
Session Clustering with a Database
Session Clustering with MongoDB
12. Configuring JNDI
Quick Setup
Detailed Setup
Working with Jetty JNDI
Configuring JNDI
Using JNDI with Jetty Embedded
Datasource Examples
13. Annotations
Quick Setup
Working with Annotations
Using Annotations with Jetty Embedded
14. JMX
Using Java Management Extensions (JMX)
Jetty JConsole
Jetty JMX Annotations
15. NPN
16. SPDY
Introducing SPDY
Configuring SPDY
Configuring SPDY Proxy
Configuring SPDY push
Implement a custom SPDY PushStrategy
17. Starting Jetty
Start Features
Start Option Matrix
18. Handlers
Rewrite Handler
Writing Custom Handlers
19. Embedding
Jetty Embedded HelloWorld
Embedding Jetty
Embedded Examples
20. Bundled Servlets, Filters, and Handlers
Default Servlet
Proxy Servlet
Balancer Servlet
CGI Servlet
Quality of Service Filter
Denial of Service Filter
Gzip Filter
Cross Origin Filter
Resource Handler
Debug Handler
Statistics Handler
IP Access Handler
Moved Context Handler
Shutdown Handler
Default Handler
Error Handler
21. Maven and Jetty
Using Maven
Configuring the Jetty Maven Plugin
Files Scanned by the Jetty Maven Plugin
Jetty Jspc Maven Plugin
22. Using Ant with Jetty
Using the Ant Jetty Plugin
23. Jetty Runner
Use Jetty without an installed distribution
24. Setuid
Configuring Setuid
25. Frameworks
Spring Setup
26. Optimizing Jetty
Garbage Collection
High Load
Limiting Load
IV. Jetty Client Guide
27. HTTP Client
API Usage
Other Features
V. Jetty WebSockets Guide
28. WebSocket Introduction
What Jetty provides
WebSocket APIs
29. Jetty Websocket API
Jetty WebSocket API Usage
WebSocket Events
WebSocket Session
Send Messages to Remote Endpoint
Using WebSocket Annotations
Using WebSocketListener
Using the WebSocketAdapter
Jetty WebSocket Server API
Jetty WebSocket Client API
VI. Reference Guide
30. Platforms, Stacks and Alternative Distributions
Many many options...
Amazon Elastic Beanstalk
31. Architecture
Jetty Architecture
Jetty Classloading
Managing 1xx Responses
32. Contributing to Jetty
Source Control and Building
Coding Standards
Contributing Patches
Releasing Jetty
Testing a Jetty Release
33. Reference Section
Jetty XML Syntax
Jetty XML Usage
Jetty override-web.xml
34. Troubleshooting
Troubleshooting Zip Exceptions
Troubleshooting Locked Files on Windows
Preventing Memory Leaks

List of Tables

1.1. Jetty Versions
1.2. Java EE 6 Web Profile
1.3. JavaEE7 Web Profile
2.1. Contents
4.1. Connector Configuration
5.1. Default Configuration classes
5.2. JNDI Configuration classes
5.3. Annotation Configuration classes
8.1. Understanding JSP Parameters
9.1. Slf4j Logging Grid
11.1. Init Parameters
12.1. DataSource Declaration Conventions
15.1. NPN vs. OpenJDK versions
25.1. Bundle Name Mapping
25.2. Jars Required for JSP
28.1. WebSocket connection states
31.1. Default System Classes
31.2. Default Server Classes

List of Examples

Client Example.
Server Example.
29.1. Send Binary Message (Blocking)
29.2. Send Text Message (Blocking)
29.3. Send Partial Binary Message (Blocking)
29.4. Send Partial Text Message (Blocking)
29.5. Send Ping Control Frame (Blocking)
29.6. Send Pong Control Frame (Blocking)
29.7. Send Binary Message (Async Simple)
29.8. Send Binary Message (Async, Wait Till Success)
29.9. Send Binary Message (Async, timeout of send)
29.10. Send Text Message (Async Simple)
29.11. Send Text Message (Async, Wait Till Success)
29.12. Send Text Message (Async, timeout of send)

See an error or something missing? Contribute to this documentation at Github!(Generated: 2013-10-30T13:20:45-05:00)