X

An Oracle blog about Java Technology

Using @Context in JAX-RS

David Delabassee
Software Evangelist
The @Context annotation gives, to a JAX-RS implementation, the ability to inject contextual information (e.g. Configuration, Security Context, etc. ) in a JAX-RS end-point. This capability is available since the early day of the specification, since JAX-RS 1.0. There are many scenarios where this feature is useful (e.g. access one of the HTTP header parameter of the consuming client).

To get more information, you can check the JAX-RS Specification (@Context is described in Chapter 9 & 10) or alternatively, you can read this 'Using @Context in JAX-RS' piece written by Abhishek Gupta (see initial instalment here).

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.