Course Image

Advanced JAX-RS

Java EE Start Course

This course covers more advanced concepts of JAX-RS. You will learn some important concepts related to resource life cycle, authentication and client APIs. You will also implement framework extensions like converters, message readers and writers.

This course covers:

  • Bootstrapping JAX-RS applications with Application class
  • Understanding resource life cycles
  • Implementing ParamConverters, MessageBodyReaders and MessageBodyWriters
  • Building a REST API client in Java using JAX-RS
  • Implementing REST API Authentication

The Application Class

Learn how to setup a JAX-RS application in an environment-agnostic way using the Application class. Deploy a REST API web application on Tomcat without a servlet.xml.

 Tomcat Setup
 Setting up pom.xml
 Setting up a JAX RS application
 The Application Class

JAX-RS Extensions

JAX-RS provides several ways to extend and customize the framework when building a REST application. You can create your own custom converters to handle data type conversions, as well as create custom readers and writers to work with the message body content.

 Resource Life Cycle
 Param Annotations and Member Variables
 Implementing Custom ParamConverters
 ParamConverters Review
 MessageBodyReaders and MessageBodyWriters
 Implementing a MessageBodyWriter
 Custom Media Types
 Unit Review

REST API Authentication

Learn how to implement authentication in your REST APIs. Learn how to create filters in JAX-RS and implement an Authentication filter that does Basic Auth.

 Unit Introduction
 Implementing Filters
 REST API Authentication Mechanisms
 Sending Basic Auth Requests
 Implementing REST API Authorization
 Unit Review

Wrapping Up

Let's wrap up the course with a few miscellaneous topics - some more details on Filters and interceptors and understanding how JAX-RS works with EJBs.

 Filters And Interceptors
 JAX-RS and EJBs


Source code

.zip file