JAX-RS – the servlet router

Even if JAX-RS is not fully bound to HTTP and is usable over JMS, WebSockets, and so on, we will just consider the HTTP case here and, more particularly, the case it runs on top of the servlet specification (which is the most common one).

The goal of JAX-RS is to provide a command pattern based on the API to implement the HTTP communications. In other words, it abstracts the I/O with Java modeling. You can see it as a HTTP Java object binding solution. This is what QuoteResource uses.

The role of JAX-RS is to provide all the necessary tooling to make servlet abstraction directly usable for most cases. For this purpose, it provides the following:

  • A routing layer letting developers directly map the request based ...

Get Java EE 8 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.