Java Servlet容器 Jetty 9 发布,支持 SPDY 和 WebSocket

jopen 12年前

Jetty 是一个开源的servlet容器,它为基于Java的web内容,例如JSP和servlet提供运行环境。Jetty是使用Java语言编写的,它的 API以一组JAR包的形式发布。开发人员可以将Jetty容器实例化成一个对象,可以迅速为一些独立运行(stand-alone)的Java应用提供网络和web连接。

Jetty 9 支持 SPDY 和 WebSocket。
下载地址:
Maven:
<groupId>org.eclipse.jetty</groupId>
<version>9.0.0.v20130308</version>
Jetty 9.x 特性:
  • Completely overhauled I/O layer
  • Servlet API 3.0
  • JSP 2.2
  • SPDY/3
  • WebSocket (RFC-6455)
</div>
移植到 Jetty 9.x 的要求:
  • Requires Java 1.7 or newer.
  • Jetty Maven Plugin has now been moved to org.eclipse.jetty groupId
  • There is no org.mortbay or codehaus components
  • Support for early WebSocket drafts has been dropped, only support released RFC-6455 spec.
  • There now only 1 aggregate jar, called jetty-all.
  • Bad UTF8 encoding will result in replacement characters being passed into the application to handle. (older versions of Jetty would fail the request)
  • Removal of all traditional Socket (BIO) Connectors.
    • Only supporting NIO for Connectors.
    </li>
  • Consolidated all of the various Deployment technique and scenarios into one.
    • ContextDeployer and WebAppDeployer have been removed
    • DeploymentManager has only 1 AppProvider now, the WebAppProvider
    • WebAppProvider supports both Deployment Descriptors deployment and traditional Automatic WAR deployment.
    • </ul> </li>
    • New Jetty Async Http Client
    • New Jetty WebSocket Servlet & WebSocket Client
    • A new Jetty XML DTD (http://www.eclipse.org/jetty/configure_9.0.dtd) changes the <Ref id=""> syntax in your Jetty XML to <Ref refid="">
    • Removed Jetty6Continuation support
    • </ul>