WebDAV Server

Last modified by Simon Urli on 2024/07/29 00:08

cogService for accessing XWiki through WebDAV
TypeJAR
CategoryAPI
Developed by

Caleb James DeLisle, Ecaterina Moraru (Valica), Eduard Moraru, Guillaume Delhumeau, Jean-Vincent Drean, Jerome Velociter, Marius Dumitru Florea, Sergiu Dumitriu, Thomas Mortagne, Vincent Massol

Active Installs10
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

XWiki 9.11+

Installable with the Extension Manager

Description

The WebDAV feature exposes wiki content (attachments, page content) through the well-known WebDAV protocol. This allows using WebDAV clients like DAVExplorer, file browsers like the Windows Explorer (XP), the Finder (MAC) or Nautilus (Linux) to directly browse and edit wiki content just as you would do for files in your local file system.

XWikiWebDAV.png

XWiki.org when seen while browsing it using a file manager over WebDAV

More specifically here are some benefits of a WebDAV-enabled XWiki installation:

  • Mount an XWiki wiki content into the user's local file system.
  • Use local application programs to manipulate page content and attachments.
  • Easily perform batch operations on documents (e.g. add 100 attachments to a document).

XWiki's WebDAV implementation only supports Basic Access Authentication and it doesn't support locking and versioning DAV operations.

WebDAV Clients

To use the XWiki-WebDAV interface you will require a WebDAV client installed on your computer, but this is not a big issue since nowadays operating systems have built-in WebDAV clients. However it should be noted that because of the number of WebDAV clients out there in the wild, we cannot cover how each of them can be used to communicate with XWiki-WebDAV. Also, these WebDAV clients may vary in behavior a lot; functionalities might not be unique across various clients or in the worst case, functionalities might even be broken on some clients. We'll keep updating this document with instructions on how to use various WebDAV clients to access the XWiki-WebDAV interface. In the mean time, if you find out that your particular WebDAV client has problems with accessing / using the XWiki-WebDAV interface, you may consult the community for reporting issues. Also, when you report an issue related to WebDAV, please try to be as informative as possible (include platform, client, XWiki version and how to reproduce the issue). Following is a list of WebDAV clients known to work with the XWiki-WebDAV interface:

Release Notes

The release notes are maintained on the corresponding (optional) UI extension WebDAV Application.

Prerequisites & Installation Instructions

Note that - unlike the (generated) banner says - you cannot install this Extension using the Extension Manager as the Servlet Container would not parse the JAR for Servlet/Filter annotations (unless the Servlet Container is especially configured to parse some additional directories but that's outside the Servlet specifications so it's possible not all Servlet Container support that).

  • Copy the following JARs into the WEB-INF/lib directory of the xwiki-webapp (versions in parenthesis are for WebDAV Server 9.5.1, check the Dependencies section below to see the versions you need):
  • Make sure to configure your Servlet Container to parse xwiki-webdav-server-<version>.jar for Servlet 3.0 annotations or add the following entries in your web.xml:
    ...
     <!-- Filter used to 'steal' webdav requests made to the application root -->
     <filter>
       <filter-name>DavFilter</filter-name>
       <filter-class>org.xwiki.contrib.webdav.XWikiDavFilter</filter-class>
     </filter>
    ...
     <filter-mapping>
       <filter-name>DavFilter</filter-name>
       <url-pattern>/*</url-pattern>
     </filter-mapping>
    ...
      <!-- WebDAV servlet -->
     <servlet>
      <servlet-name>webdav</servlet-name>
      <servlet-class>org.xwiki.contrib.webdav.XWikiDavServlet</servlet-class>
     </servlet>
    ...
     <servlet-mapping>
      <servlet-name>webdav</servlet-name>
      <url-pattern>/webdav/*</url-pattern>
     </servlet-mapping>
    ...
  • If you're using the XWiki Standalone packaging with Jetty for XWiki 9.5+ (no need for prior versions), edit jetty-deploy.xml and make sure you have the following:
    ...
         <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
           <Set name="contexts">
             <Ref refid="Contexts" />
           </Set>

           <!-- Prevent JAR scanning for tlds, annotations, etc, in order to improve startup speed. Seems it makes us win
                 about 10% on startup time. -->

           <Call name="setContextAttribute">
             <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
             <Arg>.*xwiki-webdav-server-.*\.jar</Arg>
           </Call>
    ...

Dependencies

Dependencies for this extension (org.xwiki.contrib:xwiki-webdav-server 9.5.2):

Get Connected