Book Image

Jakarta EE Cookbook - Second Edition

By : Elder Moraes
Book Image

Jakarta EE Cookbook - Second Edition

By: Elder Moraes

Overview of this book

Jakarta EE is widely used around the world for developing enterprise applications for a variety of domains. With this book, Java professionals will be able to enhance their skills to deliver powerful enterprise solutions using practical recipes. This second edition of the Jakarta EE Cookbook takes you through the improvements introduced in its latest version and helps you get hands-on with its significant APIs and features used for server-side development. You'll use Jakarta EE for creating RESTful web services and web applications with the JAX-RS, JSON-P, and JSON-B APIs and learn how you can improve the security of your enterprise solutions. Not only will you learn how to use the most important servers on the market, but you'll also learn to make the best of what they have to offer for your project. From an architectural point of view, this Jakarta book covers microservices, cloud computing, and containers. It allows you to explore all the tools for building reactive applications using Jakarta EE and core Java features such as lambdas. Finally, you'll discover how professionals can improve their projects by engaging with and contributing to the community. By the end of this book, you'll have become proficient in developing and deploying enterprise applications using Jakarta EE.
Table of Contents (14 chapters)

Improving response performance with Server Push

One of the main features of HTTP/2.0 is Server Push. Whenever it is available—by which I mean it gets the support of the protocol from the server and client browser—it lets the server send ("push") data to the client before the client asks for it.

This is one of the most popular features in JSF 2.3 and probably the one that demands less effort to use if your application is based on JSF—just migrate to a Jakarta EE 8-compatible server and then you are done.

This recipe will show you how to use it in your application and will even let you compare performance between HTTP/1.0 and HTTP/2.0 in the same scenario.

Getting ready

Start by adding the dependency...