Java Magazine, Nov/Dec 2017
Servlet 40 Doing More Faster A major new release of the Servlet API embraces the HTTP 2 protocol and anticipates resource requirements ORACLE COM JAVAMAGAZINE NOVEMBER DECEMBER 2017 13 java ee 8 The long awaited update to Java EE 8 includes updates to existing APIs JAX RS 21 Bean Validation 20 JavaServer Faces JSF 23 Contexts and Dependency Injection CDI 20 JSON with Padding JSONP 11 and Servlet 40 and two brand new APIs JSON Binding JSON B and Java EE Security Among these APIs Servlet 40 represents a major update its first since 2009 The impetus that prompted this major release rather than a point release is the worldwide rollout of the HTTP 2 protocol and the many new capabilities it brings This update to HTTP is the first in nearly 20 years and addresses many of the shortcomings of HTTP 1 x The new capabilities are numerous request response multiplexing header compression stream prioritization and server push but the most visible feature to users of the Servlet API is Server Push which I will discuss in this article Server Push is not the only noteworthy addition to Servlet 40 This release also introduces a feature refinement in the form of the Servlet Mapping API which permits the runtime discovery of mappings by refining the way referrer paths are obtained This article discusses these features and how Server Push has been integrated into the JavaServer Faces 23 API Server Push Designed to anticipate the resource requirements of a web page the Server Push feature pushes images CSS and JavaScript files and other resources to the client before request processing has been completed Therefore by the time the browser receives the response to its request for the web page the resources it needs are already in its cache and ready to use ALEX THEEDOM
You must have JavaScript enabled to view digital editions.