# LAB-5542: Project Jersey: Building RESTful Web Services in Java

Expected Duration: 120 minutes
Contacts: Martin Matula, Srinivas Bhimisetty

Introduction | Exercise 0 | Exercise 1 | Exercise 2 | Exercise 3 | Summary
Prerequisites System Software Notations Exercises Resources Questions Last Updated: May 20th, 2009 Project Jersey is the reference implementation of JAX-RS (JSR-311) - Java API for building RESTful Web Services. This API makes RESTful Web Services development with Java and some other VM-based languages very easy and straightforward. Besides the features defined by the standards, Jersey defines additional set of API's that make the developers' life even easier. In this lab, we will start from basics - showing how to build a Hello World type of application and then show some more advanced features of JAX-RS and Jersey such as support for various media types, basic error handling, MVC support and client-side API's.
    Copyright  2009 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems,
    the Sun logo, Solaris, Java, the Java Coffee Cup logo, JavaOne, the JavaOne logo,
    and all Solaris-based and Java-based marks and logos are trademarks or registered
    trademarks of Sun Microsystems, Inc. in the United States and other countries.
### Prerequisites This hands-on lab assumes you have some basic knowledge of, or programming experience in, the following technologies: Java™ language programming You will need to refer to the accompanying presentation 5542_restwebservice_slides.pdf during the lab. ### System Requirements Supported OSes: Solaris™M 8/9/10 Operating System (OS), OpenSolaris™ Operating System (OS), Linux, Windows, Mac OS X 10.4+ Memory requirement: 2GB Disk space requirement: 2GB ### Software Needed For This Lab Please install the following set of software. If you have any questions on installation, please feel free to send questions to the lab forum mentioned below. Java SE 5.0 (or more recent) Maven 2.0.9 (or more recent) NetBeans IDE 6.5 (or more recent) Firefox 3 (or more recent) Lab-5542 zip file Please refer to Exercise 0 of this lab for the guidance on how to install these. ### Notations Used in This Documentation `<lab_root>` - directory into which lab zip file is unzipped This document uses `<lab_root>` to denote the directory under which you have unzipped the lab zip file of this hands-on lab. The name of the lab zip file of this hands-on lab is 5542_restwebservice.zip. Once you unzipped the lab zip file under `<lab_root>`, it will create a subdirectory called restwebservice. For example, under Solaris, if you have unzipped the lab zip file in the /home/user directory, it will create /home/user/restwebservice directory. ### Lab Exercises Exercise 0: Install and configure the lab environment Exercise 1: Hello world! Exercise 2: Advanced JAX-RS/Jersey features Exercise 3: Using Jersey Client API ### Additional Resources API docs for JAX-RS API docs for Jersey Jersey Tutorial Wikipedia article on REST Project Jersey web site Project Jersey wiki Team blogs: Paul Sandoz, Jakub Podlesak, Marc Hadley, Srinivas Bhimisetty (aka Naresh) ### Where To Go For Help Please send technical questions via email to the public users alias: users@jersey.dev.java.net For general questions and feedback on JavaOne Hands-On Labs, please use the Hands-On Labs Forum Back to top To exercises | ### Related Resources Java SE for Business Compatibility Performance Security Mobility Timezone Updates ##### Related Downloads XML and Web Services Java Media Framework ##### Popular Topics JDK 6 Adoption Guide Java Platform Migration Guide Garbage Collection Tuning Troubleshooting Java SE ##### Sun Resources BigAdmin (sysadmin resources) Sun Web Learning Center Java Training ##### Related Sites java.com java.net NetBeans Java EE SDK OpenJDK Project Open-Source Java Project ### Getting Started? New to Java Center Java Tutorial: Getting Started Tutorials Java SE Training