The Source for Java Technology Collaboration
User: Password:



Arun Gupta

Arun Gupta's Blog

Learn to REST using Jersey

Posted by arungupta on September 06, 2007 at 05:38 AM | Comments (1)

Jersey is the open source JAX-RS (JSR 311) Reference Implementation for building RESTful Web services. Paul announced the availability of 0.2.1. This blog entry describe the steps to get started with Jersey and provide useful pointers for further exploration.

  1. Download a stable build from here or the latest binary from here. jersey-xxx-ea.zip is the binary distribution and jersey-snapshot-xxx-ea.zip is a snapshot of the SVN repository.

  2. The bundle comes with all the required binaries (JAR dependencies) and a good set of samples for 0.2.1. Here is a consolidated list:

    HelloWorld This is how everybody starts!
    GlassFishDB Demonstrates how to use JPA to expose the contents of a database table as a RESTful resource.
    JsonFromJaxb Demonstrates how to use JSON representation of JAXB-based resources.
    EntityProvider Demonstrates pluggable entity providers.
    Bookmark Demonstrates how to use JPA in the backend.
    Bookstore Demonstrates how to use ploymorphism with resources and views that are JSP pages.
    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 how to use the Lightweight HTTP Server included in Sun's Java SE 6.0 release.
    SimpleJAXWSEndpoint Demonstrates how to use a JAX-WS Endpoint.
    SimpleServlet Demonstrates how to use a Servlet container.
    StorageService Demonstrates a basic in-memory web storage service

    Pick a sample, most likely "Hello World", and then follow the instructions in the main "examples" directory to run the sample.

  3. Here are some other useful pointers:
  4. As Alexis pointed, GlassFish is the preferred platform for deploying Jersey endpoints and NetBeans 6 will soon support Jersey.

Paul explained Why the name Jersey ? - Jersey is a restful place to spend a couple of days vacation. The Yellow jersey or Maillot jaune (the project logo) is worn by the overall leader in Le Tour. With modesty I would like this to be the leading open source project for developing RESTful Web services using plain old Java objects.

And then it could also be Java basEd RESTful Services for You as coined by Sridatta :)

Technorati: jersey jsr311 REST restful glassfish netbeans


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • I'm so grateful for all that you've done. Thanks again for that nice essay and I would be most grateful if you would send me the latter ones....


    mirc
    mırc
    mirç
    mırç
    mirc indir
    chat yap
    islami sohbet
    dini sohbet
    kelebek
    kelebek sohbet
    kelebek mirc
    kameralı mirc
    kameralı sohbet
    chat yap
    çet
    çet odaları
    sohbet kanalları
    sohbet odaları
    yarışma
    sevgili
    arkadaş
    arkadaş ara
    arkadaşlık

    Posted by: jklmno on June 19, 2008 at 09:29 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds