Project Jersey is the production-ready reference implementation for the JAX-RS specification. Jersey implements support for the annotations defined in the JAX-RS specification, making it easy for developers to build RESTful web services with Java and the Java Virtual Machine (JVM).
Rest Full Web service API Design frame work
- It is used when we build a new class or when we use an method in a inner class.
- Responsible for routing the HTTP request to the proper method or class.
- This annotation can also be used with @PathParam annotation.
- Identifies the URL Path that java class will respond.
- E.g.: @Path (“/v1/message”)
- E.g.:@Path (“/v1/message/ {msg}”) (for @PathParam).
- Different Annotations @GET, @POST, @PUT, @DELETE, @HEAD
- @GET: mostly used to read and access the public methods.
- @POST: used to insert add / delete data or to submit data like login pages with HTTPS we can secure the data.
- @PUT: used for updating data mostly used for inserting/ adding the data.
- @DELETE: used delete the data.
- @HEAD: used to return meta-data for resource.
- @Produces specify the media type that a method will produce and send back to the client.
- When you see @Produces at the class level, it treated as a default.
- When used with @Produces at methods, it becomes a require to access that method.
- You can also define more than one for specific method.
- It does do some encoding but nothing extensive.
- you can define your own MediaType as seen below
- we can send it part of URL String by using URL Parameters
- we can send through the body of HTTP Request.
- Annotation specifies where it is going to look for the data, and also what type of data it was.
- It is easy better to send data in the body, but if u use something like get request than u can only use URL Parameters and we can also define our own consume types.
- For Eg.. with (pre-defined media types)










