Fork me on GitHub

Simple WebDAV Support

Apache Jackrabbit support Simple Webdav Server additionally.

Jackrabbit Simple Webdav Server is different from Jackrabbit JCR Webdav Server explained in the homepage.

Jackrabbit JCR Webdav Server is for JCR API access through underlying internal WebDAV communication, whereas Jackrabbit Simple Webdav Server is for WebDAV access against the backend JCR, mostly for file resources.

This module supports a simple WebDAV service for Hippo Repository by extending the default Simple Webdav Server. So, you can use a WebDAV client against a remote Hippo Repository by using this module.

Installation

Add Dependencies in Repository Web Application

Add all the dependencies instructed in the Installation page into your Hippo Repository Web Application (e.g. '/cms').

Add Servlet in Repository Web Application

Add the following servlet configurations into your Hippo Repository Web Application (e.g. '/cms').


  <!-- SNIP -->

  <!--
    WebDAV support (DAV 1,2 and DeltaV) to your jackrabbit repository.

    NOTE: Find example configuration for resource-config init parameter below
    from https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/config.xml.
  -->
  <servlet>
    <servlet-name>SimpleWebdavServlet</servlet-name>
    <servlet-class>org.onehippo.forge.repository.server.webdav.SimpleWebdavServlet</servlet-class>
    <init-param>
      <param-name>repository-address</param-name>
      <param-value>vm://</param-value>
    </init-param>
    <init-param>
      <param-name>allowAnonymousAccess</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>missing-auth-mapping</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>resource-config</param-name>
      <param-value>/WEB-INF/webdav-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>authenticate-header</param-name>
      <param-value>Basic realm="Hippo Repository WebDAV Access Support"</param-value>
    </init-param>
    <init-param>
      <param-name>createAbsoluteURI</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>resource-path-prefix</param-name>
      <param-value>/webdav</param-value>
    </init-param>
    <load-on-startup>7</load-on-startup>
  </servlet>

  <!-- SNIP -->

  <!--
    WebDAV support (DAV 1,2 and DeltaV) Servlet Mapping:
  -->
  <servlet-mapping>
    <servlet-name>SimpleWebdavServlet</servlet-name>
    <url-pattern>/webdav/*</url-pattern>
  </servlet-mapping>

  <!-- SNIP -->

          

How to Know It's Working?

You can test if it is working by running command lines like the following example.

$ curl --user admin:admin http://localhost:8080/cms/webdav/default/webfiles/site/
          

If successful, you get a list of the children under /webfiles/site/.