You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2007/11/27 23:34:46 UTC
svn commit: r598792 - in /tomcat/tc6.0.x/trunk: STATUS.txt
java/org/apache/catalina/servlets/WebdavServlet.java
webapps/docs/changelog.xml
Author: markt
Date: Tue Nov 27 14:34:44 2007
New Revision: 598792
URL: http://svn.apache.org/viewvc?rev=598792&view=rev
Log:
Port rev 597719. Improved Javadocs for WebDAV servlet that make it clear it can not be used at the default Servlet
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=598792&r1=598791&r2=598792&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 27 14:34:44 2007
@@ -31,11 +31,6 @@
+1: jfclere
-1: fhanik - Can we add the 'package' directive to make the package match the dir structure
-* WebDAV JavaDoc update as a result of bug 43893
- http://svn.apache.org/viewvc?rev=597719&view=rev
- +1: markt, pero, remm
- -1:
-
* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43887
Include exception in log message
http://svn.apache.org/viewvc?rev=597738&view=rev
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=598792&r1=598791&r2=598792&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Tue Nov 27 14:34:44 2007
@@ -67,7 +67,49 @@
/**
* 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:<br/><code>
+ * <servlet><br/>
+ * <servlet-name>webdav</servlet-name><br/>
+ * <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class><br/>
+ * <init-param><br/>
+ * <param-name>debug</param-name><br/>
+ * <param-value>0</param-value><br/>
+ * </init-param><br/>
+ * <init-param><br/>
+ * <param-name>listings</param-name><br/>
+ * <param-value>true</param-value><br/>
+ * </init-param><br/>
+ * </servlet><br/>
+ * <servlet-mapping><br/>
+ * <servlet-name>webdav</servlet-name><br/>
+ * <url-pattern>/*</url-pattern><br/>
+ * </servlet-mapping>
+ * </code>
+ * <p/>
+ * This will enable read only access. To enable read-write access add:<br/>
+ * <code>
+ * <init-param><br/>
+ * <param-name>readonly</param-name><br/>
+ * <param-value>false</param-value><br/>
+ * </init-param><br/>
+ * </code>
+ * <p/>
+ * To make the content editable via a different URL, using the following
+ * mapping:<br/>
+ * <code>
+ * <servlet-mapping><br/>
+ * <servlet-name>webdav</servlet-name><br/>
+ * <url-pattern>/webdavedit/*</url-pattern><br/>
+ * </servlet-mapping>
+ * </code>
+ * <p/>
+ * 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$
@@ -327,7 +369,6 @@
* @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(
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=598792&r1=598791&r2=598792&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Nov 27 14:34:44 2007
@@ -63,6 +63,10 @@
<fix>
Fix a bug that causes CGI Servlet to fail when it is included. (markt)
</fix>
+ <update>
+ Improve the webDAV Servlet Javadocs to make clear that the WebDAV
+ Servlet can not be used as the default servlet. (markt)
+ </update>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org