On 07/02/2019 00:31, Jesse Schulman wrote:
> Is it possible for tomcat to run with HTTP2 and WebSockets on the same
> connector?  I have tried configuring it myself and looked for examples
> without success.

This works out of the box.

I have confirmed the behaviour with my local build of 9.0.x but nothing
has changed in this area for a number of releases.

First you need an HTTP/2 capable connector. That means:

Tomcat 8.5.x or Tomcat 9.0.x

NIO or NIO2 + JSSE + Java 9 or later
or
APR/Native
or
NIO or NIO2 + OpenSSL (via Tomcat Native)

If no explicit Java version is mentioned then any supported version of
Java for the version of Tomcat being used is fine.

Configure TLS.

Browse to http://localhost:8443

Observe in browser that HTTP/2 is used

Navigate to https://localhost:8443/examples/websocket/snake.xhtml and
you'll see HTTP/2 being used for the static content and wss (not over
HTTP/2) being used for the WebSocket traffic.

All over the single TLS enabled connector listening on port 8443.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to