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:
UpgradeProtocol
Connector
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.
server.xml configuration file.
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.
cargo.tomcat.connector.protocolClass
TomcatPropertySet.CONNECTOR_PROTOCOL_CLASS
HTTP/1.1
cargo.tomcat.connector.sslImplementationName
TomcatPropertySet.CONNECTOR_SSL_IMPLEMENTATION_NAME
org.apache.tomcat.util.net.openssl.OpenSSLImplementation
cargo.tomcat.connector.httpUpgradeProtocol
TomcatPropertySet.CONNECTOR_HTTP_UPGRADE_PROTOCOL
org.apache.coyote.http2.Http2Protocol
<UpgradeProtocol>