Book Image

Restful Java Web Services Security

By : René Enríquez
Book Image

Restful Java Web Services Security

By: René Enríquez

Overview of this book

Table of Contents (12 chapters)

Custom filters


As a brief introduction, JAX-RS 2.0 has two different concepts for interceptions: filters and interceptors.

Interceptors are components that intercept EJB method invocations. They can be used to audit and log as and when EJBs are accessed. This is a topic that won't be included in this book, but if you feel curious and want to find out some more about it, we give you the following links as references so you can look it up:

Filters are mainly used to alter or process incoming and outgoing request or response headers. They can be executed before and after request and response processing.

Also, JAX-RS 2.0 offers us two categories of filters: server-side filters and client-side filters. The following diagram shows us a better classification of this concept:

Server-side filters

When we are on the server side, we have another classification...