JAX-RS 2.x Basics

JAX-RS: Java™ API for RESTful Web Services (JAX-RS) is a Java programming language API spec that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. JAX-RS uses annotations, introduced in Java SE 5, to simplify the development and deployment of web service clients and endpoints.

Testing JAX-RS Resources

This article explains how to set up and tear down a Grizzly Server for testing JAX-RS resources, how to create a HTTP request and assert the response using JUnit 4. And finally, the limits of testing API in reality.

18 Dec 2018

JAX-RS Client API

This post explains what is JAX-RS Client API and how to use it via Jersey Client API. We will talk about the Maven dependencies, Client, WebTarget, and HTTP response.

11 Dec 2018

Exception Handling in JAX-RS

This post explains exception mapper, how to register it in JAX-RS application programmatically or via annotation, the exception matching mechanism (nearest-superclass), and more.

03 Dec 2018

JAX-RS Param Annotations

This post explains different param annotations in JAX-RS 2.1 and their use-cases, including @QueryParam, @MatrixParam, @PathParam, @HeaderParam, @CookieParam, @FormParam and @BeanParam.

27 Nov 2018

HTTP Methods in JAX-RS

This article explains the common HTTP methods in JAX-RS: annotation @GET, @POST, @PUT, and @DELETE.

20 Nov 2018

Simple REST Demo With JAX-RS

A quickstart demo for creating REST service in Java using JAX-RS 2.0. The sample is implemented by Jersey, the reference implementation of JAX-RS.

13 Nov 2018