Jersey (JAX-RS) Tutorials

Jersey RESTful Web Services framework is open source, production quality, framework for developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation. Jersey framework is more than the JAX-RS Reference Implementation. Jersey provides it’s own API that extend the JAX-RS toolkit with additional features and utilities to further simplify RESTful service and client development.

This page will list down links to all Jersey RESTful web-services tutorials available in this blog for quick access. I will try to categorize these tutorials to further simplify the look up process.

Jersey Hello World Examples

Some quick start examples to use JAX-RS Jersey implementation.

Jersey 1.x hello world application
Jersey 2.x hello world application
Jersey-quickstart-archetype Hello World Application

Jersey Basic Examples

Basic annotations and functions to develop REST based CRUD APIs.
Custom Exceptions Handling with ExceptionMapper
Case-insensitive URLs in Jersey
Set cookie in REST response entity

Jersey Advanced Examples

Advanced examples related to file upload or download, integration with other frameworks and exception handling.

Jersey file upload example
Jersey + Ajax Multi-File Upload Example
Jersey file download example
Jersey + MOXy JSON Example
Jersey + JSONP Example
Jersey + Google Gson Example
Jersey REST API Security Example
Jersey custom logging request and response entities

Jersey Client

Jersey RESTful Client GET/PUT/POST/DELETE Examples
Jersey RESTful Client API Authentication Example
Set Cookie Example

Possible exceptions you may face

You may face these exception in some scenarios. Learn to overcome them.

[Solved] java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer
SOLVED: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

Happy Learning !!

Was this post helpful?

Join 7000+ Fellow Programmers

Subscribe to get new post notifications, industry updates, best practices, and much more. Directly into your inbox, for free.

3 thoughts on “Jersey (JAX-RS) Tutorials”

  1. Hi,
    I am new to this field. All i know currently is JAVA and servlets. What things should i learn beforehand to learn REST -JERSEY.

  2. Hello,
    as I am dealing with JSON and dates I currently have to annotate each date with the @JsonFormat like

    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
        public Date startDate;

    Is there a way to generelly set this format so I do not have to set it at each date member?

    Kind regards,

Comments are closed.


A blog about Java and its related technologies, the best practices, algorithms, interview questions, scripting languages, and Python.