Project Jersey is an open source community that is building the production quality reference implementation of JSR-311: JAX-RS - Java API for RESTful Web Services. Jersey implements support for the annotations defined in JSR-311, making it easy for developers to build RESTful web services with Java and the Java JVM. Besides implementing the JSR-311 API, Jersey provides an additional API not specified by JSR-311 so that developers can extend this JSR to suit their specific needs. This wiki contains information for the developers using Jersey, for the developers improving Jersey, and for the people with a general interest in RESTful Web Services.
We hope that you will find the Jersey Wiki to be a valuable informational resource. We actively encourage you to become a contributor and share your knowledge about Jersey and RESTful Web Services with the rest of the open source community. Contributors to existing or new wiki topics only need to have a registered user id and some knowledge they'd like to share.
If you're new to Jersey and/or RESTful Web Services, and are unable to find the information you need on this wiki page, please leave us a comment and we'll do our best to find the answer and add it to the wiki so that it will be available to all.
RESTful Web services are services that are built to work best on the Web.
Representational State Transfer (REST) is an architectural style that specifies constraints, such as the uniform interface, that if applied to a Web service induce desirable properties, such as performance, scalability and modifiability, that enable services to work best on the Web.
In the REST architectural style, data and functionality are considered resources, and these resources are accessed using Uniform Resource Identifiers (URIs), typically links on the web. The resources are acted upon by using a set of simple, well-defined operations. The REST architectural style constraints an architecture to a client-server architecture, and is designed to use a stateless communication protocol, typically HTTP. In the REST architecture style, clients and servers exchange representations of resources using a standardized interface and protocol. These principles encourages RESTful applications to be simple, lightweight, and have high performance.
To find out more about REST, try these sources for more information:
- Fielding Dissertation: Chapter 5: Representational State Transfer (REST), at http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
- Wikipedia article on Representational State Transfer (REST), at http://en.wikipedia.org/wiki/RESTful
- Read the getting started document on how to develop your first simple JAX-RS application with Jersey.
- Read the JAX-RS Overview of JAX-RS 1.0 Features for many details of the JAX-RS API and deployment using Jersey.
- Read the dependencies document to understand how to use Jersey with maven and the Java.Net maven repository.
- Check out the samples that ship with Jersey. For more info on the examples, see the section below.
- Read the blogs (referenced below) or read the Jersey FAQ for information on more advanced topics.
- Read the Jersey Tutorial, also known as the RESTful Web Services Developers Guide. This tutorial contains the following topics:
- Follow the Jersey Hands-On Lab
- Check out our Jersey User Guide.
- Browse the API docs for JAX-RS 1.1.
- JAX-RS 1.1 Changelog .
- We tried to make the Jersey API docs really useful by adding comprehensive package overview sections.
- Peruse the Jersey team members blogs:
- Earthly Powers, by Paul Sandoz, at http://blogs.sun.com/sandoz/category/REST.
- Marc Hadley's Blog, at http://weblogs.java.net/blog/mhadley/.
- Japod's Blog, by Jakub Podlesak, at http://blogs.sun.com/japod/category/REST.
- Naresh's Blog, at http://blogs.sun.com/naresh/category/REST.
- Martin Matula's Blog, at http://blog.alutam.com/category/rest.
- Marek Potociar's Blog, at http://marek.potociar.net/topics/web-services/rest/.
- Pavel Bucek's Blog, at http://blogs.oracle.com/pavelbucek/.
- Santiago Pericas-Geertsen's Blog, at http://www.java.net/blogs/spericas/.
- Jonathan Benoit's Blog, at http://blogs.oracle.com/jonathan/.
- Refer to the Jersey FAQ for answers to frequently asked questions.
The sample applications, which are listed below, can be downloaded here.
- HelloWorld: This is how everybody starts using Grizzly as in the process HTTP server.
- HelloWorld Web app: This is how everybody starts using a Web application.
- Bookmark Web app: Demonstrates how to use JPA in the backend.
- Bookstore Web app: Demonstrates how to use polymorphism with resources and views that are JSP pages.
- EntityProvider: Demonstrates pluggable entity providers.
- Extended WADL Web app:Demonstrates how to customize generation of WADL.
- Generate WADL: Demonstrates how to customize generation of WADL.
- Jaxb: Demonstrates the use of JAXB-based resources.
- JMaki-backend Web app: Provides JSON to be consumed by jMaki widgets.
- JsonFromJaxb: Demonstrates how to use JSON representation of JAXB-based resources.
- Mandel: A Mandelbrot service written in Scala using Scala's actors to scale-up the calculation.
- OptimisticConcurrency: Demonstrates the application of optimistic concurrency to a web resource.
- SimpleAtomServer:Simple Atom server that partially conforms to the Atom Publishing Format and Protocol.
- SimpleConsole: Demonstrates a simple service using Grizzly.
- SimpleServlet: Demonstrates how to use a Servlet container.
- Sparklines: A sparklines application inspired by Joe Gregorio's python application.
- Spring annotations: An example leveraging Jersey's Spring-based annotation support.
- StorageService: Demonstrates a basic in-memory web storage service.
Here are a few other examples. Please add any others to the list that you find useful.
- Jersey and WADL; http://wikis.sun.com/display/Jersey/WADL
- RESTful Web Services and Comet: http://developers.sun.com/appserver/reference/techart/cometslideshow.html
- Jersey WebDAV Support
- There are also some Code Snippets for common use cases.
- Schedule - Planned features and Jersey release dates
- External Links - Links to articles and blogs containing samples and hints for using Jersey
- WADL - What does jersey provide related to WADL and how this can be used
- Contributing areas - Ideas for how you can contribute
- Accessing Jersey Issues Tracker using Eclipse IDE - How to access the Jersey Issue Tracker using Eclipse IDE