The intent of this document is to show how to use Jackrabbit through the WebDAV interface. This document has primarly been designed to help migrate Jakarta Slide users who mainly used WebDAV for interfacing and would like to migrate their repositories to Jackrabbit – but should be useful for migration from any WebDAV-enabled repository to Jackrabbit.
Please note that Jackrabbit's WebDAV is mainly targeted at exposing a JCR repository over WebDAV. If you want a general purpose WebDAV server framework in Java (such as the old Apache Slide), there are other choices, which might be better: Sardine or Milton.
Configuration oriented setup
- Setting up jackrabbit for properties.
- Indexing properties for faster searching.
Process oriented examples
- Injecting a binary file.
- Adding properties about the file.
- Searching the properties for your file.
- Jackrabbit WebDAV API
Migrating existing data
- General SSL access examples - with keystore, ignoring keystores.
Setting up jackrabbit for properties
Indexing properties for faster searching
Injecting a binary file
If you have existing code or implementation for injecting WebDAV binary file, that will work without change on Jackrabbit. The only difference is the webdav resource you should use would be something like:
- http://server:8080/<war resource>/repository/<workspace>
Adding properties about the file
If you have existing code or implementation for applying properties to your binary file (PROPPATCH), this will work with work with the default setup provided with Jackrabbit. To restrict the properties or specifically modify the overall import/export behavior of properties, please refer to the configuration options (see resource-config init-param within the web.xml and the related config.xml).
Unlike Jakarta Slide that allowed arbitrary properties, Jackrabbit requires specified nodeType and nodeProperties. See NodeTypeRegistry for some pre-existing nodeType definitions and http://jackrabbit.apache.org/doc/nodetype/index.html on defining your own.
Searching the properties for your file
The default DASL <basicsearch> mechanisms will not work with Jackrabbit. Instead, XPATH-style searches and SQL searches within the <searchrequest> tag must be used.
In addition, the webdav libraries from the Jakarta Slide project for the SearchMethod class do not seem to work correctly with Jackrabbit (not sure if the libs or Jackrabbit), instead you need to use org.apache.jackrabbit.webdav.client.methods.SearchMethod where you need/should use javax.jcr.query.Query.SQL and javax.jcr.query.Query.XPATH constants as parameters to define the query type.
Please update with examples.
Jackrabbit WebDAV API
Using the WebDAV-Client API linked with standard WebDAV-Server
- Init the Client
- Copy a File
- Reading all properties of a resource
- Getting a list of subresources of a resource * Setting a property of a resource
General SSL access examples
History of Page: