As a part of Java EE 7, it is easy to create RESTful web services using JAX-RS 2.0. Using JAX-RS annotations, we can map the POJO resource class to the URIs and the URI templates. Using annotations, it becomes easier to develop web services. Different
@*Param
annotations are available to access the values of the user request:
@PathParam
@QueryParam
@MatrixParam
@HeaderParam
@CookieParam
@FormParam
@DefaultValue
@Context
JAX-RS also supports all the Java data types to be supplied in the @*Param
annotations. There are other APIs available to create the RESTful web services, but mostly they require more coding. However, in the Jersey implementation of JAX-RS, it is simpler and easier to create the RESTful web services. JAX-RS manages to encode and decode the request/response content according to the media type it mentioned.