The provided container options are generally sufficient for most applications which use HTTP or HTTPs; some options are callback functions to provide greater custom control over the Jetty objects.
The following table lists the container options supported by Jetty.
| Key | Value type | Description | 
|---|---|---|
| 
 | Boolean | Use daemon threads. Defaults to  | 
| 
 | String | Context path for the application; must start with a  | 
| 
 | Integer | The maximum number of threads to use. Defaults to  | 
| 
 | Integer | The maximum number of concurrent streams for an HTTP2 or HTTP2C connector. Defaults to  | 
| 
 | Boolean | Reuse the socket address. Defaults to  | 
| 
 | A ThreadPool instance. | Override the Jetty thread pool (ignores max-threads) | 
| 
 | Function | A function called with the Server instance. Expected to return the Server instance. Use when advanced customization is required. | 
| 
 | Function | A function called with the ServletContextHandler instance. Use when advanced customization is required. | 
| 
 | Boolean | Allows connections over HTTPS. | 
| 
 | Integer | Port to use for TLS listener. Defaults to  | 
| 
 | Boolean | HTTP/2 cleartext support. Allows upgrading connections from HTTP/1.1 to the Http/2 protocol. Defaults to  | 
| 
 | Boolean | HTTP/2 TLS support. When  | 
| 
 | Vector of Functions | A vector of functions that each take the options map and an HttpConfiguration instance and return a ConnectionFactory instance. Applies only to the SSL connection. | 
| 
 | An SslContextFactory instance. | The  | 
| 
 | String or  | Used for TLS. Path to keystore file or a  | 
| 
 | String | Used for TLS. Keystore password. Not used if :ssl-context-factory is set. | 
| 
 | String or  | Used for TLS. Path to keystore file or a  | 
| 
 | String | Used for TLS. Trust store password. Not used if :ssl-context-factory is set. | 
| 
 | String | SSL client certificate authenticate, may be set to :need, :want or :none. Defaults to :none. | 
| 
 | String | Java Security Provider name. Refer to the Jetty Configuring SSL/TLS documentation. Not used if :ssl-context-factory is set. | 
| 
 | An HttpConfiguration instance. | The  | 
The default HttpConfiguration is:
SendDateHeader is set to true
SendXPoweredBy is set to false
SendServerVersion is set to false
An instance of org.eclipse.jetty.server.SecureRequestCustomizer is
added via addCustomizer
When :ssl?, :ssl-port or h2? is provided,
securePort is set to the value of :ssl-port and secureScheme
is set to "https".
Can you improve this documentation? These fine people already did:
Howard M. Lewis Ship & EnzzoEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |