Representational State Transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web.
rest_logoThis page lists down all tutorials on this website available on this topic. This page will be updated everytime, I will write any post on RESTful web services. Feel free to suggest topics you want to read more on.

Hello world application

RESTEasy + JBOSS 7 Hello world application
Learn about most basic configuration needed to build a RESTful web application in JBOSS AS7
RESTEasy + Tomcat Hello world application
Learn about minimum configuration needed to build a RESTful web application using Tomcat server

Annotations usage and examples

JAX-RS @Path Regex based URI matching
Example of API path matching using @Path annotation. Some regular expression examples are also included.

REST clients

RESTful client using java.net package
Build restful client for consuming the restful apis using java.net package
Build restful client for consuming the restful apis using inbuilt jax-rs capabilities
Build restful client for consuming the restful apis using apache http client framework
Learn to build resteasy ajax client
JAX-RS 2.0 has brought lots of improvement over previous version. One of major improvement is client API which was completely missing in JAX-RS 1.0. Learn to use in this tutorial.

XML/JSON support

Learn to marshal model objects in xml documents using JAXB and send them to client as server response
Learn to marshal model objects in json documents using Jettison and send them to client as server response
Learn to marshal model objects in json documents using Jackson and send them to client as server response

File Download/Upload

This example shows the configuration and code needed to download various file formats using RESTful API
Upload the file to server using pure java client
Upload the file to server using html form submission

Hateoas Implementation

Learn making RESTful web services with HATEOAS links enabled

JAX-RS Security

Implement security using PreProcessorInterceptor.
PreProcessorInterceptor and PostProcessorInterceptor are deprecated now. So from now on, use ContainerRequestFilter and ContainerReponseFilter. Learn to use them in this tutorial.

Request Validation

Build ajax powered html form validation functionality for your web page
Integrate hibenate bean validation capability to your RESTEasy APIs

Various Integrations

Learn how to write RESTful web services using Spring 3 framework

Logging Support

Demo configuration to add log4j logging support in RESTEasy application
Demo configuration to add slf4j logging support in RESTEasy application

Best practices

Share context data using ResteasyProviderFactory
ResteasyProviderFacory can be proved very handy when you want to share some data in various layers of application without passing them as method parameters
Build custom exception mappers to handle application specific handling of various exceptions
JAX-RS Resteasy has automatic GZIP decompression support. Learn to use it.
ETags or entity tags are useful HTTP headers which can help in building a super fast application by minimizing the server load on system. ETag is set to the response to the client so a client can use various control request headers such as If-Match and If-None-Match for conditional requests. javax.ws.rs.core.Response.ResponseBuilder#tag() and javax.ws.rs.core.EntityTag are useful classes to work on ETags.

Resources