Jetty Logo
Version: 9.2.2-SNAPSHOT
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

Configuring SPDY

The spdy-jetty-http module provides an out-of-the-box server connector that performs the SPDY to HTTP conversion and vice versa (HTTP over SPDY). You can use this connector instead of Jetty's SslSelectChannelConnector (which only speaks HTTP), and it falls back to HTTPS if SPDY is not negotiated.

An example jetty-spdy.xml file that you can use instead of jetty-ssl.xml follows:

This is sufficient to enable your Jetty server to speak SPDY to browsers that support it. Old browsers or browsers that don't support SPDY yet speak plain HTTP on the same connector.

Remember, however, that SPDY over SSL (as set up like the configuration above) requires that you set up NPN correctly; in particular, you need to start the JVM with the NPN boot Jar in the boot classpath.

Be aware that NPN is supported only for the TLS protocol, version 1 or greater; this means you cannot use it with SSLv2, which implies that you have to configure the SslContextFactory to use TLSv1 or above, since the JDK usually sends a SSLv2 ClientHello message to secure servers. To do so, specify the includeProtocols property to contain at least the value TLSv1 (see code example above).

See an error or something missing? Contribute to this documentation at Github!(Generated: 2014-09-22T01:00:26-07:00)