Category: Jersey
JAX-RS @QueryParam Example
The JAX-RS @QueryParam annotation allows you to inject URI query parameters into your Java parameters. These query parameters are represented as a string of characters within the HTTP request. JAX-RS can convert this string...
Test Jersey Rest Service with JUnit
In this example we show you how to test Jersey Rest Services with JUnit. JerseyTest is developed by Jersey themselves in order to facilitate the testing of their rest services. You can really easily...
Upload a File with Jersey using AJAX and HTML5 progress bar
In this tutorial we will show you how to upload a file with Jersey Rest Service using AJAX and HTML5 progress bar. First we start by creating our jersey restful service. We’ve chosen to...
Configure Jersey with Annotations only
In this tutorial we show you how to Configure Jersey with Annotations. By using only Annotations to configure jersey, the web.xml file becomes obsolete. This results in cleaner code which is always a good...
Generic Rest Service Jersey Error Handling
This tutorial explains the best practices how to handle jersey error handling. Basically we create a generic exception handler that will handle all exceptions thrown by any methods inside a rest service. Dependencies Add...
JAX-RS JSON Rest Service with Jersey Example
In this tutorial we will show you how you can create a JSON rest service with jersey that will respond with JSON output. This tutorial covers both jersey version 1 and 2. Maven Dependencies...
JAX-RS XML Rest Service with Jersey and JAX-B Example
In this tutorial we will show you how you can create a jersey XML rest service that will respond with XML output. This tutorial covers both jersey version 1 and 2. Maven Dependencies <?xml...
JAX-RS Rest Service Example with Jersey in Java
In this tutorial we will show you the basic configuration needed to get a RESTful web service up and running. Get the required dependencies, create and expose methods and finally configure the servlet to...