JAX-RS
Learn about Java APIs for RESTful web services.
We'll cover the following...
JAX-RS 1.0
JAX-RS 1.0 (the Java API for RESTful Web Services) was defined in JSR-311¹⁶⁴. It has many implementations, including the following:
- CXF: A merger between XFire and Celtix (an Open Source ESB, sponsored by IONA, and originally hosted at ObjectWeb).
- Jersey : The JAX-RS Reference Implementation from Oracle.
- RESTEasy : JBoss’s JAX-RS project.
JAX-RS defines a set of request method designators for the common HTTP methods: @GET
, @POST
, @PUT
, @DELETE
, and @HEAD
.
When a resource class is instantiated, the values of fields and bean properties annotated with one of the following annotations are set according to the semantics of the annotation:
@MatrixParam
: Extracts the value of a URI matrix parameter.@QueryParam
: Extracts the value of a URI query parameter.