BaseX 7.6

Tomcat 7

Oxygen Editor 14

Ubuntu 12.10


We would like writers to edit BaseX source via WebDAV and require level 2 WebDAV conformance (locking). We have uncommented: 


...

  <servlet>

    <servlet-name>WebDAV</servlet-name>

    <servlet-class>org.basex.http.webdav.WebDAVServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

  </servlet>

  <servlet-mapping>

    <servlet-name>WebDAV</servlet-name>

    <url-pattern>/webdav/*</url-pattern>

  </servlet-mapping>


within .../tomcat7/webapps/bxApp/WEB-INF/web.xml. The class org.basex.http.webdav.WebDAVServlet does not seem to implement low-level, server-side methods such as LOCK. To verify that locking is possible with our toolset, we followed this generic Tomcat/WebDAV tutorial (http://www.mulesoft.com/tomcat-webdav). 


Tutorial's web.xml:


<?xml version="1.0" encoding="UTF-8"?>
<web-app
...
 
<display-name>Tomcat webDAV TEST 1</display-name>
 
<description>webDAV HTTP Services</description>
<servlet>
 
<servlet-name>webdav</servlet-name>
 
<servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
 
<init-param>
   
<param-name>debug</param-name>
   
<param-value>0</param-value>
 
</init-param>
 
<init-param>
   
<param-name>listings</param-name>
   
<param-value>true</param-value>
 
</init-param>
 
<init-param>
   
<param-name>readonly</param-name>
   
<param-value>false</param-value>
 
</init-param>
</servlet>
<servlet-mapping>
 
<servlet-name>webdav</servlet-name>
 
<url-pattern>/webdav/*</url-pattern>
</servlet-mapping>
 
<security-constraint>
   
<web-resource-collection>
     
<web-resource-name>myApp</web-resource-name>
     
<url-pattern>/*</url-pattern>
     
<http-method>PROPFIND</http-method>
     
<http-method>PROPPATCH</http-method>
     
<http-method>COPY</http-method>
     
<http-method>MOVE</http-method>
     
<http-method>LOCK</http-method>
     
<http-method>UNLOCK</http-method>
   
</web-resource-collection>
 
</security-constraint>
<security-role>
<description>WebDAV User</description>
<role-name>webdav</role-name>
</security-role>
</web-app>


The tutorial demonstrated for us that locking is possible. 


What is the relationship/interaction between org.apache.catalina.servlets.WebdavServlet, with its full compliment of methods, and  org.basex.http.webdav.WebDAVServlet? Or more to the point, how should web.xml within our BaseX servlet be configured within for webDAV on Tomcat? Does org.basex.http.webdav.WebDAVServlet even enter into the equation for our use (e.g., locking). An example web.xml would be much appreciated. 


Also, is authentication for WebDAV using credentials from .../tomcat/config/tomcat-users.xml (as in the tutorial), from .basexperm, or from some other source? 


Thank you in advance for your help.


Sean