Jersey WebDAV Support

This page assembles information about Jersey's WebDAV Support.

Abstract

Besides being the reference implementation (RI) of JAX-RS, Jersey also comes with several additional features not covered by this standard. One of these features is core support for the WebDAV protocol.

What is it good for?

Using Jersey's WebDAV support, it is pretty easy to implement a WebDAV based RESTful WebService (instead of "just" a HTTP based RESTful WebService). There are two main aspects: (1) Using WebDAV instead of HTTP allows to provide a lot of cool features, like using a RESTful WebService like a File System (e. g. using WebDAV based file systems), or like using pessimistic locking where HTTP only provides proprietary client applications or web browsers to access the service and provides "only" optimistic locking. See the WebDAV specification at ietf.org to learn more about WebDAV's features above HTTP's. (2) Writing a WebDAV service is hard work, since WebDAV is complex. Jersey's supporting code makes it easier, since it provides a lot of prebuild WebDAV building Blocks, e. g. JAXB classes that make it easy to read and write all of WebDAV's special HTTP bodies. It's not a complete WebDAV server, but it is a collection of useful bricks to build one – just like Jersey is not a WebServer but a collection of bricks to build one.

Who did it?

The initial WebDAV contribution (the core code) was provided by Markus KARG (karg@users.dev.java.net) in December 2008. He currently is in charge of coordinating this contribution project.

Many thanks to Daniel MANZKE for providing a lot of useful patches and input. Also thanks to Julian RESCHKE, Marc HADLEY and last but not least Paul SANDOZ for answering all of my silly questions and discussing lots of implementational and conceptional details with me. Also thanks for Craig McCLANAHAN for being part of this team.

How does it work?

The intial contribution contains of three things:

  • JAXB classes for all the XML elements and properties defined in RFC 4918 (see http://www.ietf.org/rfc/rfc4918.txt). These can be used directly as parameters or return types with Jersey methods, so implementing e. g. PROPFIND becomes rather simple. No need to deal with String concatenation, SAX or DOM.
  • WebDAV specific response codes as predefined constants. These provide clearly to read names instead of ambiguous numbers.
  • WebDAV specific HTTP headers as predefined constants. Using those prevents typos.
Does it support WebDAV's extensibility?

Yes, even the first draft of the initial contribution already comes with full support for custom properties. There is a sample included that shows how custom properties can be used together with and inexactly in the same way as standard properties.

Are there any samples?

The initial contribution contains one sample that showcases how to use the building bricks.

Where are the unit tests?

There are no unit tests yet. If somebody wants to volunteer on that, please write to Markus KARG (mkarg@users.dev.java.net). We really appreciate your help.

Where to get it?

There is no binary published yet, you need to access the Jersey SVN repository to get it. Do not select trunk but branches/webdav. The contribution is to be found in the subfolder contrib/webdav.

Current Status and Development Schedule

The current first draft contains "only" building blocks (but is fully functional). Starting in 2009, the initial contribution will get extended to cover a lot more WebDAV extensions and features. There is no schedule what features will be covered when, but on the agenda there are the following topics (unsorted):

  • Providing better support for several WebDAV features. Candidates are locking, ResponseBuilder, and ExceptionWrapper. If you have any general purpose WebDAV whishes, just tell Markus.
  • Covering "Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)" (RFC 3253)
  • Covering "Web Distributed Authoring and Versioning (WebDAV) Ordered Collections Protocol" (RFC 3648)
  • Covering "Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol" (RFC 3744)
  • Covering "Quota and Size Properties for Distributed Authoring and Versioning (DAV) Collections" (RFC 4331)
  • Covering "Calendaring Extensions to WebDAV (CalDAV)" (RFC 4791) – might be a good starting point for a JAX-RS based groupware server.
  • Covering "Web Distributed Authoring and Versioning (WebDAV) SEARCH" (RFC 5323)
  • Covering "WebDAV Current Principal Extension" (RFC 5397)

Anything you like to see supported in WebDAV? Write to Markus! He is coordinating the WebDAV work currently.

Where to get more information?

Currently there is not more information than this page. If you have any questions or comments, please write to Markus KARG (mkarg@users.dev.java.net).

Is this used in the real world?

Yes and no. The initial contribution was developed as a spin-off abstraction from a very specific real world software, currently in use by several dozens of enterprises. Since the Jersey contribution itself is not yet published, itself obviously cannot be in use in the real world. Daniel MANZKE is working on a WebDAV server ontop of Jersey which makes use of several parts of this contribution, but this product is not yet finished nor published. While the original code is in productive use, the contribution itself should be considered as experimental for now. Chances are good that the code will change to production quality in Q1/2009. You should check this page from time to time to see any status changes.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact