This post explains how to create filters in JAX-RS code. The filters can be placed before and after the web resource. So we can use the filters for 1) modifying the request 2) restricting certain requests from reaching the webresource 3) modifying the response In the below code I have created a custom filter, which…… Continue reading Creating filters in JAX-RS
Month: May 2018
BeanParam annotation example
This post will explain the use of BeanParam annotation in JAX-RS with an example. The purpose of BeanParam annotation is to consolidate all the user input (i.e., input through QueryParam, HeaderParam, FormParam, etc) and inject into a given class instance variables. Below is an example of webresource whose only method “retrieveRecord1” has a parameter annotated…… Continue reading BeanParam annotation example