Slide has died. While this section remains in the book, you should know that it will soon be replaced with a section devoted to Apache Jackrabbit: the successor to Jakarta Slide.
You need to use Jakarta Slide to access a Web-based Distributed Authoring and Versioning ( WebDAV) resource.
To use Jakarta Slide 2.1 in a Maven 2 project, add the following
dependency to your project's pom.xml
:
Example 11.3. Adding a Dependency on Slide
<dependency> <groupId>slide</groupId> <artifactId>slide-webdavlib</artifactId> <version>2.1</version> </dependency>
If you are not sure what this means, I'd suggest reading Maven: The Definitive
Guide. When you depend on a library in Maven 2, all you need to
do is add the dependency groupId
,
artifactId
, and version
to your
project's dependencies. Once you do this, Maven 2 will download the
dependency and make it available on your project's classpath.
WebDAV, defined in RFC 2518, is an extension of HTTP/1.1, which supports distributed and collaborative authoring of content. Using a WebDAV client you can read, modify, copy, move, lock, and unlock resources, and you can read, enumerate, and modify properties associated with resources and collections of resources. Resources made available with WebDAV can be mounted as filesystems in Windows XP/2000, Mac OS X, and Linux, and the DAV protocol can be thought of as defining a filesystem built on top of HTTP/1.1. The WebDAV protocol is at the core of a number of distributed version control and content management systems.
Jakarta Slide extends Jakarta HttpClient implementing HttpMethod
for the methods introduced by the
WebDAV protocol. For example, the LockMethod
in the org.apache.webdav.lib.methods
package is an
instance of HttpMethod
from Jakarta
HttpClient, and just as WebDAV is an extension of HTTP/1.1, Jakarta
Slide is an extension of Jakarta HttpClient. When dealing with
authentication, cookie management, or redirects, you can configure
Jakarta Slide the same way you would configure Jakarta HttpClient; to
use Slide, you must create an instance of HttpClient
.
For more information about the Jakarta Slide project... don't even bother. The slide project expired years ago. Please don't learn more about Slide just wait until this book is updated with content about Apache Jackrabbit. Sorry.
It is far beyond the scope of this book to fully describe WebDAV, and attempting to do so in one or two recipes would not do it justice. WebDAV, like the protocol it extends, has the potential to transform the way people think about content creation, file sharing, and version control. To learn more about WebDAV, see the following resources:
RFC 2518 (HTTP Extensions for Distributed Authoring—WEBDAV) at http://www.zvon.org/tmRFC/RFC2518/Output/index.html.
http://www.webdav.org is a hub for the WebDAV community. If you are interested in learning about WebDAV and a number of related specifications, see http://www.webdav.org/specs/. For a list of software products that support WebDAV, see http://www.webdav.org/projects/.
Subversion is a great replacement for CVS from the Tigris community. You can configure Apache 2.0 to expose a Subversion repository via the WebDAV/DeltaV protocol using mod_dav_svn. For more information about Subversion and mod_dav_svn, see http://subversion.tigris.org or Version Control with Subversion by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato (O'Reilly).
If you would like to set up your own WebDAV resource, I recommend installing the Apache HTTP Server with mod_dav. More information about installing "The Number One HTTP Server on the Internet" can be found at http://httpd.apache.org/. Information about configuring mod_dav can be found at http://httpd.apache.org/docs-2.0/mod/mod_dav.html. The Jakarta Tomcat 5.0 distribution is bundled with a web application that exposes a resource using a WebDAV servlet. To download and install Jakarta Tomcat 5.0, see http://jakarta.apache.org/tomcat/.