/
Configuring HTTP/2 for Tomcat 8.5 and above
Configuring HTTP/2 for Tomcat 8.5 and above
Tomcat 8.5 and above support HTTP/2 (see https://tomcat.apache.org/tomcat-8.5-doc/config/http2.html).
In a standalone installation you need to configure an element UpgradeProtocol
inside the Connector
in server.xml
:
server.xml
<Connector port="8443" protocol="..." sslImplementationName="..."> <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/> ... </Connector>
These properties control the generation of the server.xml
configuration file.
Remark: The file generation doesn't have any logic nor it doesn't do any validation. It's just an XML replacement and adding mechanism.
Connector attributes
Property name | Java name | Default | Description |
---|---|---|---|
cargo.tomcat.connector.protocolClass | TomcatPropertySet.CONNECTOR_PROTOCOL_CLASS | HTTP/1.1 | Sets the protocol of the connector, see https://tomcat.apache.org/tomcat-8.5-doc/config/http.html for details |
cargo.tomcat.connector.sslImplementationName | TomcatPropertySet.CONNECTOR_SSL_IMPLEMENTATION_NAME | org.apache.tomcat.util.net.openssl.OpenSSLImplementation | The SSL implementation to be used, see https://tomcat.apache.org/tomcat-8.5-doc/config/http.html for details |
UpgradeProtocol element
Property name | Java name | Description |
---|---|---|
cargo.tomcat.connector.httpUpgradeProtocol | TomcatPropertySet.CONNECTOR_HTTP_UPGRADE_PROTOCOL | Must be org.apache.coyote.http2.Http2Protocol , if set the <UpgradeProtocol> element will be added |
, multiple selections available,
Related content
Containers with HTTPS support
Containers with HTTPS support
More like this
Tomcat 4.x
Tomcat 4.x
More like this
Tomcat 5.x
Tomcat 5.x
More like this
Tomcat 11.x
Tomcat 11.x
More like this
Deploying legacy WARs to Tomcat 10.x onwards
Deploying legacy WARs to Tomcat 10.x onwards
More like this
Tomcat 10.x
Tomcat 10.x
More like this