O'Reilly logo

Developing RESTful Services with JAX-RS 2.0, WebSockets, and JSON by Bhakti Mehta, Masoud Kalali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing Servlet 3.1

The Java EE 7 specification brings along an updated specification for Servlet API, which addresses some of the community-requested and industry-required changes including but not limited to the following list of changes:

  • Addition of the NIO API to servlet specification
  • Adding new protocol upgrading support for WebSockets, and so on

The next two sections cover the details of these changes and how they can be used.

NIO API and Servlet 3.1

Servlet 3 introduced async processing of incoming requests in which a request could be placed in a processing queue without a thread being bound to the request until the request processing is finished. In Servlet 3.1, another forward step made forward in which receiving the request data writing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required