Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Attribute

Description

minThreads

Specifies the minimum number of threads available to the Jetty instance for processing requests.

maxThreads

Specifies the maximum number of threads available to the Jetty instance for processing requests.

Anchor
jetty_http2
jetty_http2
HTTP/2 support

If HttpServerEngineSupport#ENABLE_HTTP2  bus property is set, Jetty engine will enable the HTTP/2 support as well: HTTP/2 over cleartext (h2c) if TLS is not configured, regular HTTP/2 otherwise. It requires additional dependencies to be bundled by the application.

Code Block
xml
xml
<dependency>
    <groupId>org.eclipse.jetty.http2</groupId>
    <artifactId>http2-server</artifactId>
    <version>${jetty.version}</version>
</dependency>

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-alpn-server</artifactId>
    <version>${jetty.version}</version>
</dependency>

Additionally, for JDK8 you would need to include:

Code Block
java
java
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-alpn-openjdk8-server</artifactId>
    <version>${jetty.version}</version>
</dependency>

If you are using JDK9 and above, please use the following dependency instead:

Code Block
xml
xml
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-alpn-java-server</artifactId>
    <version>${jetty.version}</version>
</dependency>

Example

The example below shows a configuration fragment that configures a Jetty instance on port number 9001.

...