Links: Table of Contents | Single HTML

Jersey 1.11.1 User Guide


Table of Contents

Preface
1. Getting Started
1.1. Creating a root resource
1.2. Deploying the root resource
1.3. Testing the root resource
1.4. Here's one Paul created earlier
2. Overview of JAX-RS 1.1.1
2.1. Root Resource Classes
2.1.1. @Path
2.1.2. HTTP Methods
2.1.3. @Produces
2.1.4. @Consumes
2.2. Deploying a RESTful Web Service
2.3. Extracting Request Parameters
2.4. Representations and Java Types
2.5. Building Responses
2.6. Sub-resources
2.7. Building URIs
2.8. WebApplicationException and Mapping Exceptions to Responses
2.9. Conditional GETs and Returning 304 (Not Modified) Responses
2.10. Life-cycle of Root Resource Classes
2.11. Security
2.12. Rules of Injection
2.13. Use of @Context
2.14. Annotations Defined By JAX-RS
3. Client API
3.1. Introduction
3.2. Uniform Interface Constraint
3.3. Ease of use and reusing JAX-RS artifacts
3.4. Getting started with the Jersey client
3.5. Overview of the API
3.5.1. Configuring a Client and WebResource
3.5.2. Building a request
3.5.3. Receiving a response
3.5.4. Creating new WebResources from a WebResource
3.5.5. Java instances and types for representations
3.6. Adding support for new representations
3.7. Using filters
3.7.1. Supported filters
3.8. Testing services
3.9. Security with Http(s)URLConnection
3.9.1. With Http(s)URLConnection
3.9.2. With Apache HTTP client
4. XML Support
4.1. Low level XML support
4.2. Getting started with JAXB
4.3. POJOs
4.4. Using custom JAXBContext
5. JSON Support
5.1. POJO support
5.2. JAXB Based JSON support
5.2.1. Configuration Options
5.2.2. JSON Notations
5.2.3. Examples
5.3. Low-Level JSON support
5.3.1. Examples
6. Declarative Hyperlinking
6.1. Links in Representations
6.2. Binding Template Parameters
6.3. Conditional Link Injection
6.4. Link Headers
6.5. Configuration
7. Jersey Test Framework
7.1. What is different in Jersey 1.2
7.2. Using test framework
7.3. Creating tests
7.4. Creating own module
7.5. Running tests outside Maven
8. OSGi
8.1. Feature Overview
8.2. WAB Example
8.3. Http Service Example
9. JRebel support
9.1. How to use JRebel with Jersey
9.2. Using JRebel with the hello world sample
9.3. Limitations
10. Experimental Features
10.1. Hypermedia Actions
10.1.1. Introduction
10.1.2. Hypermedia by Example
10.1.3. Server API
10.1.4. Client API
10.1.5. Server Evolution
10.1.6. Configuring Hypermedia in Jersey
11. Dependencies
11.1. Core server
11.2. Core client
11.3. Container
11.3.1. Grizzly HTTP Web server
11.3.2. Simple HTTP Web server
11.3.3. Light weight HTTP server
11.3.4. Servlet
11.4. Entity
11.4.1. JAXB
11.4.2. Atom
11.4.3. JSON
11.4.4. Mail and MIME multipart
11.4.5. Activation
11.5. Tools
11.6. Spring
11.7. Guice
11.8. Jersey Test Framework
12. Jersey with GlassFish
12.1. Overriding Jersey with war files
12.2. Upgrading Jersey in GlassFish
12.2.1. GlassFish v3.0 and 3.0.1
12.2.2. GlassFish 3.1
13. Building and testing Jersey
13.1. Checking out the source
13.2. Building using Maven
13.3. Testing
13.4. Continuous building and testing with Hudson
13.5. Using NetBeans

List of Tables

7.1. Property name changes

List of Examples

2.1. Simple hello world root resource class
2.2. Specifying URI path parameter
2.3. PUT method
2.4. Specifying output MIME type
2.5. Using multiple output MIME types
2.6. Specifying input MIME type
2.7. Deployment agnostic application model
2.8. Reusing Jersey implementation in your custom application model
2.9. Deployment of a JAX-RS application using @ApplicationPath with Servlet 3.0
2.10. Configuration of maven-war-plugin in pom.xml with Servlet 3.0
2.11. Deployment of a JAX-RS application using web.xml with Servlet 3.0
2.12. Deployment of your application using Jersey specific servlet
2.13. Using Jersey specific servlet without an application model instance
2.14. Query parameters
2.15. Custom Java type for consuming request parameters
2.16. Processing POSTed HTML form
2.17. Obtaining general map of URI path and/or query parameters
2.18. Obtaining general map of header parameters
2.19. Obtaining general map of form parameters
2.20. Using File with a specific MIME type to produce a response
2.21. The most acceptable MIME type is used when multiple output MIME types allowed
2.22. Returning 201 status code and adding Location header in response to POST request
2.23. Adding an entity body to a custom response
2.24. Sub-resource methods
2.25. Sub-resource locators
2.26. URI building
2.27. Building URIs using query parameters
2.28. Throwing Jersey specific exceptions to control response
2.29. Jersey specific exception implementation
2.30. Mapping generic exceptions to responses
2.31. Conditional GET support
2.32. Accessing SecurityContext
2.33. Injection
3.1. POST request with form parameters
4.1. Low level XML test - methods added to HelloWorldResource.java
4.2. Planet class
4.3. Resource class
4.4. Method for consuming Planet
4.5. Resource class - JAXBElement
4.6. Client side - JAXBElement
4.7. PlanetJAXBContextProvider
4.8. Using Provider with Jersey client
5.1. POJO JSON support web.xml configuration
5.2. POJO JSON support client configuration
5.3. Simple JAXB bean implementation
5.4. JAXB bean used to generate JSON representation
5.5. Tweaking JSON format using JAXB
5.6. An example of a JAXBContext resolver implementation
5.7. JAXB beans for JSON supported notations description, simple address bean
5.8. JAXB beans for JSON supported notations description, contact bean
5.9. JAXB beans for JSON supported notations description, initialization
5.10. JSON expression produced using mapped notation
5.11. Force arrays in mapped JSON notation
5.12. Force non-string values in mapped JSON notation
5.13. XML attributes as XML elements in mapped JSON notation
5.14. Keep XML root tag equivalent in JSON mapped JSON notation
5.15. XML root tag equivalent kept in JSON using mapped notation
5.16. XML namespace to JSON mapping configuration for mapped notation
5.17. JSON expression produced using natural notation
5.18. Keep XML root tag equivalent in JSON natural JSON notation
5.19. JSON expression produced using Jettison based mapped notation
5.20. XML namespace to JSON mapping configuration for Jettison based mapped notation
5.21. JSON expression with XML namespaces mapped into JSON
5.22. JSON expression produced using badgerfish notation
5.23. JAXB bean creation
5.24. Constructing a JSONObject