Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Jetty/Howto/Configure Jetty
Contents
Introduction
Configuring jetty consists of building a network of connectors and handlers and providing their individual configurations. It is a combination of
- HTTP server configuration (ports, thread pools, buffers, etc.)
- Web container configuration (webapps deployment, security realms, JNDI etc.)
- Web application (init parameters, non standard options, etc.)
Configuring Jetty
Since Jetty components are simply Plain Old Java Objects (POJOs), you can accomplish this assembly and configuration of components by a variety of techniques:
- In code
- Using Jetty XML
- Embedding Jetty
- Using the Jetty Maven Plugin
- Using Your Favorite Dependency Injection Framework
- Configuring Jetty with Spring
- Configuring Jetty with XBean
- Using Jetty WebApp and Context Deployers
- Using Web XML Descriptors
In Code
See the examples in the Jetty 7 Latest Source XRef.
Using Jetty XML
With Jetty XML - dependency injection style XML format. Jetty XML used with jetty.xml and other files
Embedding Jetty
Using the Jetty Maven Plugin
Using Your Favorite Dependency Injection Framework
Configuring Jetty with Spring
Configuring Jetty with XBean
Using Jetty WebApp and Context Deployers
More
For more configuration references, see the Jetty Configuration Reference pages.
Finally
Because Jetty configuration can be considered as calling setters on a collection of POJOs, regardless of the actual method used, the apidocs are the ultimate resource for configuration.