We earn commission when you buy through affiliate links.
This does not influence our reviews or recommendations.Learn more.
HTTP/2 is fast, much faster than HTTP/1.1.
Its recommended testing this in a non-production environment to ensure program behave as expected.
Read this if you are looking to enable in a web server like Apache or Nginx.
Pre-requisite
Tomcat must be secured with SSL/TLS certificate before implementing HTTP2.
If you need help with the implementation, then check out this guide.
Overall, it should look like below.
This means Tomcat is ready to serve requests over HTTP2 protocol.
There are multiple ways to test this.
Using Chrome
Useful for testing Intranet applications.
And, as it’s possible for you to see the requests were served using h2.
Using Logs
Look at access.log file and review the incoming requests.
Do you seeHTTP/2.0is being categorized in every request?
Conclusion
Implementing H2 on Tomcat is straightforward.
I would strongly recommend testing your utility post implementation to ensure there are no side-effects.
If you are interested in learning Tomcat administration, then check out thisonline course.