Introduction

In order to install the repostories and sites with DaV support, you should follow thes steps:

#The Common WebDaV application
#The sites
#The central repository
#The 3rd-party repository
#The projects repository
#The projects-snapshot repository
#Verifying the installation

The Common WebDaV application

All the DaV webapps for sites and repositories follow the same model of application.

This model of application is implemented as a directory called $(webapp.directory) with the following content:

$(webapp.directory)/
$(webapp.directory)/WEB-INF
$(webapp.directory)/WEB-INF/web.xml

The web.xml file has the following content:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <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>/</url-pattern>
  </servlet-mapping>
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>The Entire Web Application</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>
    <user-data-constraint>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
  </security-constraint>
</web-app>

The sites

Copy your common DaV application in the $(server.data.home)/sites directory.

Creates a sites.xml file in the $(server.tomcat.base)/conf/Catalina/localhost directory with the following content (dont forget to expand the $(xxx) variables with your defined values):

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/sites" docBase="$(server.data.home)/sites/"/>

The central repository

Copy your common DaV application in the $(server.data.home)/repositories/central directory.

Creates a central.xml file in the $(server.tomcat.base)/conf/Catalina/localhost directory with the following content (dont forget to expand the $(xxx) variables with your defined values):

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/central" docBase="$(server.data.home)/repositories/central/"/>

The 3rd-party repository

Copy your common DaV application in the $(server.data.home)/repositories/3rd-party directory.

Creates a 3rd-party.xml file in the $(server.tomcat.base)/conf/Catalina/localhost directory with the following content (dont forget to expand the $(xxx) variables with your defined values):

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/3rd-party" docBase="$(server.data.home)/repositories/3rd-party/"/>

The projects repository

Copy your common DaV application in the $(server.data.home)/repositories/projects directory.

Creates a projects.xml file in the $(server.tomcat.base)/conf/Catalina/localhost directory with the following content (dont forget to expand the $(xxx) variables with your defined values):

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/projects" docBase="$(server.data.home)/repositories/projects/"/>

The projects-snapshot repository

Copy your common DaV application in the $(server.data.home)/repositories/projects-snapshot directory.

Creates a projects-snapshot.xml file in the $(server.tomcat.base)/conf/Catalina/localhost directory with the following content (dont forget to expand the $(xxx) variables with your defined values):

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/projects-snapshot" docBase="$(server.data.home)/repositories/projects-snapshot/"/>

Verifying the installation

To ensure the installation worked (at least for reading), point your web browser to http://localhost:8080/manager/html/list with a valid user.

Create a file in each of the application directories (with each file a different name).

Then click on each of the applications links, which should be :