This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 78bc44a384 Improve javadoc
78bc44a384 is described below

commit 78bc44a384f3b26c1cb7ced4e736a48180f83530
Author: remm <r...@apache.org>
AuthorDate: Thu Jan 16 16:58:53 2025 +0100

    Improve javadoc
    
    Document WebDAV with listings since otherwise it won't really work.
    Add the test schema for the database since it's a working example.
---
 .../catalina/servlets/DataSourcePropertyStore.java | 23 ++++++++++++++++------
 .../apache/catalina/servlets/WebdavServlet.java    |  8 ++++----
 2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DataSourcePropertyStore.java 
b/java/org/apache/catalina/servlets/DataSourcePropertyStore.java
index 9044809870..bbb2cf3515 100644
--- a/java/org/apache/catalina/servlets/DataSourcePropertyStore.java
+++ b/java/org/apache/catalina/servlets/DataSourcePropertyStore.java
@@ -43,12 +43,23 @@ import org.w3c.dom.Node;
 /**
  * WebDAV dead properties storage using a DataSource.
  * <p>
- * The schema is:
- * table properties ( path, namespace, name, node )
- * path: the resource path
- * namespace: the node namespace
- * name: the local name in the namespace
- * node: the full serialized XML node including the name
+ * A single properties table with four columns is used:
+ * <ul>
+ * <li>path: the resource path</li>
+ * <li>namespace: the node namespace</li>
+ * <li>name: the local name in the namespace</li>
+ * <li>node: the full serialized XML node including the name</li>
+ * </ul>
+ * The table name used can be configured using the <code>tableName</code> 
property of the store.
+ * <p>
+ * Example table schema:
+ * <code>CREATE TABLE properties (
+ *    path         VARCHAR(1024) NOT NULL,
+ *    namespace    VARCHAR(64) NOT NULL,
+ *    name         VARCHAR(64) NOT NULL,
+ *    node         VARCHAR(2048) NOT NULL,
+ *    PRIMARY KEY (path, namespace, name)
+ * )</code>
  */
 public class DataSourcePropertyStore implements WebdavServlet.PropertyStore {
 
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index f2fbc22ec1..30b7722f7e 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -96,7 +96,7 @@ import org.xml.sax.SAXException;
  *    &lt;/init-param&gt;
  *    &lt;init-param&gt;
  *      &lt;param-name&gt;listings&lt;/param-name&gt;
- *      &lt;param-value&gt;false&lt;/param-value&gt;
+ *      &lt;param-value&gt;true&lt;/param-value&gt;
  *    &lt;/init-param&gt;
  *  &lt;/servlet&gt;
  *  &lt;servlet-mapping&gt;
@@ -105,7 +105,7 @@ import org.xml.sax.SAXException;
  *  &lt;/servlet-mapping&gt;
  * </pre>
  *
- * This will enable read only access. To enable read-write access add:
+ * This will enable read only access with folder listings enabled. To enable 
read-write access add:
  *
  * <pre>
  *  &lt;init-param&gt;
@@ -123,7 +123,7 @@ import org.xml.sax.SAXException;
  *  &lt;/servlet-mapping&gt;
  * </pre>
  *
- * By default access to /WEB-INF and META-INF are not available via WebDAV. To 
enable access to these URLs, use add:
+ * By default access to /WEB-INF and META-INF are not available via WebDAV. To 
enable access to these URLs, add:
  *
  * <pre>
  *  &lt;init-param&gt;
@@ -143,7 +143,7 @@ import org.xml.sax.SAXException;
  * interface and configuring the Servlet to use that store. The 
<code>propertyStore</code> init-param allows configuring
  * the classname of the store to use, while the parameters in the form of 
<code>store.xxx</code> will be set on the
  * store object as bean properties. For example, this would configure a store 
with class
- * <code>com.MyPropertyStore</code>, and set its field <code>myName</code> to 
value <code>myValue</code>:
+ * <code>com.MyPropertyStore</code>, and set its property <code>myName</code> 
to value <code>myValue</code>:
  *
  * <pre>
  *  &lt;init-param&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to