From 4679c6bd17568d5251e6a82717baf4fb8b0393b0 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 23 Nov 2007 19:02:38 +0000 Subject: [PATCH] Update WebDAV javadocs as a result of bug 43893 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@597719 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/catalina/servlets/WebdavServlet.java | 45 +++++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 6ceee1f8c..d997890cb 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -67,7 +67,49 @@ import org.xml.sax.SAXException; /** * Servlet which adds support for WebDAV level 2. All the basic HTTP requests - * are handled by the DefaultServlet. + * are handled by the DefaultServlet. The WebDAVServlet must not be used as the + * default servlet (ie mapped to '/') as it will not work in this configuration. + * To enable WebDAV for a context add the following to web.xml:
+ * <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>
+ * </servlet>
+ * <servlet-mapping>
+ * <servlet-name>webdav</servlet-name>
+ * <url-pattern>/*</url-pattern>
+ * </servlet-mapping> + *
+ *

+ * This will enable read only access. To enable read-write access add:
+ * + * <init-param>
+ * <param-name>readonly</param-name>
+ * <param-value>false</param-value>
+ * </init-param>
+ *
+ *

+ * To make the content editable via a different URL, using the following + * mapping:
+ * + * <servlet-mapping>
+ * <servlet-name>webdav</servlet-name>
+ * <url-pattern>/webdavedit/*</url-pattern>
+ * </servlet-mapping> + *
+ *

+ * Don't forget to secure access appropriately to the editing URLs. With this + * configuration the context will be accessible to normal users as before. Those + * users with the necessary access will be able to edit content available via + * http://host:port/context/content using + * http://host:port/context/webdavedit/content * * @author Remy Maucherat * @version $Revision$ $Date$ @@ -326,7 +368,6 @@ public class WebdavServlet * @param request The servlet request we are processing */ protected String getRelativePath(HttpServletRequest request) { - // Are we being processed by a RequestDispatcher.include()? if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) { String result = (String) request.getAttribute( -- 2.11.0