This section outlines the common terms you will encounter as you work with WebDAV.
URI. A URI (Uniform Resource Identifier) is a file identifier that provides an additional layer of security by using an abbreviated URL. The first part of the URL is substituted with a URL mapping that hides the file’s full physical pathname from the user.
A JSP page, foo.jsp, is located at the URI /docs/date.jsp. This page contains HTML markup and Java code which, when executed, prints today’s date on the client’s browser. When the server receives a GET request for foo.jsp from a client, before serving the page it executes the Java code. What the client receives is not foo.jsp which resides on the server, but a dynamically generated page that displays the current date.
If you were to create a source URI, for example, /publish/docs, and map it to the /docs directory containing foo.jsp, then a request for /publish/docs/foo.jsp will be a request for the source code of the /docs/foo.jsp JSP page. In this case, the server will serve the page without executing the Java code. The client will receive the unprocessed page exactly as stored on disk.
A request for the source URI is thus a request for the source of the resource.
Collection. A WebDAV collection is a resource or a set of resources that are enabled for WebDAV operations. A collection contains a set of URIs, termed member URIs, which identify member resources that are WebDAV-enabled.
Internal Member URI. A Member URI that is immediately relative to the URI of the collection. For example, if the resource with the URL http://info.sun.com/resources/info is WebDAV-enabled and if the resource with the URL http://info.sun.com/resources/ is also WebDAV-enabled, then the resource with the URL http://info.sun.com/resources/ is a collection and contains http://info.sun.com/resources/info as an internal member.
Property. A name/value pair that contains descriptive information about a resource. Properties are used for efficient discovery and management of resources. For example, a ’creationdate’ property might allow for the indexing of all resources by the date on which the resources were created, and an ’author’ property, for indexing by author name.
Live Property. A property that is enforced by the server. For example, the live getcontentlength property has as its value, the length of the entity returned by a GET request, which is automatically calculated by the server. Live properties include the following:
The value of a property is read-only, maintained by the server
The value of the property is maintained by the client, but the server performs syntax checking on submitted values.
Dead Property. A property that is not enforced by the server. The server only records the value of a dead property; the client is responsible for maintaining its consistency.
The server supports the following live properties:
The server supports the live property executable that enables clients to change the file permissions associated with a resource.
An example of a PROPPATCH request for the executable live property:
PROPPATCH /test/index.html HTTP/1.1
<A:propertyupdate xmlns:A="DAV:" xmlns:B="http://apache.org/dav/props/">
Locking. The ability to lock a resource provides a mechanism to guarantee that one user will not modify a resource while it is being edited by another. Locking prevents overwrite conflicts and resolves the "lost updates" problem.
The server supports two types of locking: shared and exclusive.
New HTTP Methods. WebDAV introduces several new HTTP methods that instruct WebDAV-enabled servers how to handle requests. These methods are used in addition to existing HTTP methods such as GET, PUT, and DELETE to carry out WebDAV transactions. The new HTTP methods are briefly described below:
PROPFIND. Used to fetch one or more properties belonging to one or more resources. When a client submits a PROPFIND request on a collection to the server, the request may include a Depth: header with a value of 0, 1, or infinity.
0. Specifies that the properties of the collection at the specified URI will be fetched.
1. Specifies that the properties of the collection and resources immediately under the specified URI will be fetched.
infinity. Specifies that the properties of the collection and all member URIs it contains will be fetched. Be aware that because a request with infinite depth will crawl the entire collection, it can impose a large burden on the server.