简体   繁体   中英

Tomcat support for HTTP/2.0?

Does anyone know what is the lowest version of Tomcat that supports HTTP/2.0? I've been looking everywhere on their site and I cannot find any details regarding this.

I'm the HTTP/2 implementer in Jetty, and I watch out other projects implementing HTTP/2.

Tomcat's Mark Thomas has outlined support for HTTP/2 for Tomcat 9 .

Update Jan 2017 : Tomcat 8.5 supports HTTP/2 see @joe-aldrich answer https://stackoverflow.com/a/37889873/2027465

Considering that Servlet 4.0 is going to have as a target HTTP/2 support, and that HTTP/2 support requires ALPN support in the JDK (which also I am involved in), and that ALPN support in the JDK is scheduled for JDK 9, it is probably going to be a long time before all that materializes.

However, be aware that other Servlet Containers already provide HTTP/2 support.

Jetty 9.3.0 has full, robust, support for HTTP/2 , client and server. We have been running HTTP/2 on our own website for many months now, and we consider HTTP/2 support production ready. Jetty's HTTP/2 Push APIs are being considered for inclusion in Servlet 4.0. HTTP/2 Push is already available to applications deployed to Jetty in a transparent way (via a Servlet Filter).

Undertow also has an implementation for HTTP/2.

Netty also has one, but it's not based on the Servlet APIs.

Tomcat 8.5已发布,具有从Tomcat 9反向移植的功能,并包含HTTP / 2支持。

The latest version of Tomcat ( version 9 ) fully supports HTTP/2. However, as all major browsers only implement HTTP/2 over TLS you will need to configure Tomcat to allow this. This article explains TLS configuration in Tomcat , but here's the summary.

Open the conf/server.xml file and make the following configuration changes.

<Connector port="8443"
  protocol="org.apache.coyote.http11.Http11AprProtocol"
  maxThreads="150" SSLEnabled="true">
    <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
    <SSLHostConfig honorCipherOrder="false">
        <Certificate certificateKeyFile="conf/ca.key"
          certificateFile="conf/ca.crt"/>
    </SSLHostConfig>
</Connector>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM