Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP/2 support in Tomcat 8

After some research, I was surprised that I did not not find any resource on HTTP/2 support in Tomcat. Changelogs of 8.0 indicate an experimental support of SPDY and wiki refers to HTTP/2 as a supported spec (http://wiki.apache.org/tomcat/Specifications) but I don't find any tutorial on it.

Do you know if it is already possible to enable HTTP/2 on Tomcat? If the answer is yes how I can do that?

like image 476
Guillaume D. Avatar asked Mar 31 '15 09:03

Guillaume D.


People also ask

Does Tomcat 9 support HTTP2?

Full HTTP2 support is added to the latest version of Tomcat 9. x. HTTP/2 is fast, much faster than HTTP/1.1. If you directly serve the content to the browser (without going through a web server) from Tomcat then implementing HTTP/2 can drastically reduce the application load time and overall improve the performance.

Is Tomcat 8.0 still supported?

The Apache Tomcat team announces that support for Apache Tomcat 8.0. x will end on 30 June 2018. This means that after 30 June 2018: releases from the 8.0.

What is the difference between Tomcat 8 and 9?

There isn't a lot of difference between Tomcat 8.5 and 9.0: the former started as a fork of the first pre-release versions of Tomcat 9.0. Since the big changes in Java EE Servlet API came with version 3.0 (which is supported by Tomcat 7.0) I don't foresee any major problems with the migration to a newer Tomcat release.

What is truststoreFile in Tomcat?

According to the tomcat docs: truststoreFile. The trust store file to use to validate client certificates. The default is the value of the javax. net.


3 Answers

Tomcat does not yet support HTTP/2.

HTTP/2 support is planned for Tomcat 9 onwards. It may get back-ported to earlier versions.

The experimental SPDY support was just that: experimental. It worked while the browsers supported the particular version of SPDY but no browser currently supports the version of SDPY implemented by Tomcat.

That experimental support of SPDY has been removed from Tomcat 8.0.22, noted in the changelog.

like image 117
Mark Thomas Avatar answered Oct 16 '22 00:10

Mark Thomas


Tomcat 8.5 has been released with features back-ported from Tomcat 9 and includes HTTP/2 support.

I haven't personally had the chance to setup HTTP/2 on Tomcat 8.5 yet, so I can't comment on the "how to".

like image 32
Joe Aldrich Avatar answered Oct 16 '22 00:10

Joe Aldrich


HTTP/2 Support is now available in Tomcat. Tomcat-8.5 supports HTTP/2. To enable HTTP/2 in tomcat-8.5 or above you need to upgrade the connector protocol in the file server.xml in the tomcat conf folder.

<Connector ... >
  <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
</Connector>

You also need to set up the configuration of your SSL certificates to work with this connector.

like image 8
Dhumil Agarwal Avatar answered Oct 16 '22 01:10

Dhumil Agarwal