web.xml

Most of what you need to know about the web.xml file is already documented within the file itself. However if you use anything besides the given defaults (namespace, domain.xml location, ...) you will need to modify this file.

Example

    <servlet>
        <servlet-name>webdav</servlet-name>
        <display-name>Slide DAV Server</display-name>
        <servlet-class>org.apache.slide.webdav.WebdavServlet</servlet-class>
        <init-param>
            <param-name>domain</param-name>
            <param-value>/Domain.xml</param-value>
            <description>
                Path to the domain configuration file, relative to the path of the
                web application.
                The default is '/Domain.xml'.
            </description>
        </init-param>
        <init-param>
            <param-name>namespace</param-name>
            <param-value>cansas</param-value>
            <description>
                Name of the Slide namespace that should be accessed by this servlet.
                If this parameter is provided, make sure the corresponding namespace
                is defined in the domain configuration file. Otherwise, the default
                namespace will be used, if one exists.
            </description>
        </init-param>
        <init-param>
            <param-name>scope</param-name>
            <param-value/>
            <description>
                 Scope of the Slide namespace that should be exposed by this servlet.
                 For example, if you want to expose only the /files collection via
                 WebDAV, set this parameter to '/files'. In that case, any URLs of the
                 form '/context-path/servlet-path/*' will be mapped to '/files/*'
                 in the Slide namespace.
                 The default value is an empty string.
            </description>
        </init-param>
        <init-param>
            <param-name>depth-limit</param-name>
            <param-value>3</param-value>
            <description>
                 This init-parameter determines the depth limit for PROPFIND and other
                 methods, to avoid performance hits on the server for requests with
                 infinite depth.
                 The default value is '3'.
            </description>
        </init-param>
        <init-param>
            <param-name>default-mime-type</param-name>
            <param-value>application/octet-stream</param-value>
            <description>
                The MIME type that should be used for resources of unknown type. For
                example, if a WebDAV client uploads a file (via PUT) without specifying
                the Content-Type header, the MIME type defined here will be used.
                The default value is 'application/octet-stream'.
            </description>
        </init-param>
        <init-param>
            <param-name>default-servlet</param-name>
            <param-value>true</param-value>
            <description>
                By default, the WebDAV servlet is mapped as default servlet of the
                web application context (the url-pattern in servlet-mapping is '/').
                If you want to change that mapping so the servlet is no longer the
                default servlet, you must change this initialization parameter to
                indicate the situation to the servlet, by setting it to 'false'.
                The default value is 'true'.
            </description>
        </init-param>
        <init-param>
            <param-name>directory-browsing</param-name>
            <param-value>true</param-value>
            <description>
                 Use the 'directory-browsing' init-parameter to turn off generation of
                 HTML index pages that enable browsing of collections (by setting this
                 parameter to 'false'), or to specify a web-app relative path to a
                 template resource (a JSP page, for example) which should handle
                 generation of the HTML index page. In the latter case, you can use a
                 JSP page at WEB-INF/index.jsp by specifying '/WEB-INF/index.jsp' as
                 value of this parameter.
                 The default value is 'true'.
            </description>
        </init-param>
        <init-param>
            <param-name>directory-browsing-hide-acl</param-name>
            <param-value>true</param-value>
            <description>
                Use this parameter to hide ACL information in generated HTML index pages.
                (see parameter "directory-browsing")
                The default value is 'true'.
            </description>
        </init-param>
        <init-param>
            <param-name>directory-browsing-hide-locks</param-name>
            <param-value>true</param-value>
            <description>
                Use this parameter to hide locking information in generated HTML index pages.
                (see parameter "directory-browsing")
                The default value is 'true'.
            </description>
        </init-param>
        <init-param>
            <param-name>optimizePropfindOutput</param-name>
            <param-value>true</param-value>
            <description>
                If set to false, the PropFindMethod will first create a (large) JDOM 
                document in memory and then write it to the response stream. 
                If set true, the PropFindMethod will write results to the stream as
                soon as they are available. This will reduce memory consumption
                in the case of large responses (PROPFIND on many resources).
                The output of these two variants differ slightly, since in optimized 
                mode the D:DAV namespace is declared in the multistatus element AND
                in all response elements. Since this is still a valid XML document
                it shouldn't be a problem, but in case you encounter any diffculties
                this switch provides a way to get around it. 
            </description>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>extendedAllprop</param-name>
            <param-value>false</param-value>
            <description>
            According to RFC3253 (DeltaV), RFCxxxx (ACL) and RFCxxxx (Binding),
            a DAV:allprop PROPFIND should not return any of the properties defined
            in any of that documents.
            For testing purposes, the specified behaviour can be disabled by 
            setting this parameter "true".
            </description>
        </init-param>
        <init-param>
            <param-name>lockdiscoveryIncludesPrincipalURL</param-name>
            <param-value>true</param-value>
            <description>
                As proposed on February 08, 2003 by Lisa Dusseault in 
                w3c-dist-auth-request@w3.org, the DAV:lockdiscovery property should 
                include an element DAV:principal-URL with the semantics of the 
                WebDAV/ACL specification. This feature can be switched-off in case 
                of interoperability problems.
            </description>
        </init-param>
        <init-param>
            <param-name>updateLastModified</param-name>
            <param-value>true</param-value>
            <description>
                This parameter controls whether modifying properties via 
                PROPPATCH causes the last modification date of the 
                resource to be updated or not.
            </description>
        </init-param>
        <load-on-startup>1</load-on-startup>
        <!-- Uncomment this to get authentication -->
        <security-role-ref>
            <role-name>root</role-name>
            <role-link>root</role-link>
        </security-role-ref>
        <security-role-ref>
            <role-name>guest</role-name>
            <role-link>guest</role-link>
        </security-role-ref>
        <security-role-ref>
            <role-name>user</role-name>
            <role-link>user</role-link>
        </security-role-ref>
    </servlet>

WebXMLConfig (last edited 2009-09-20 22:02:43 by localhost)