markt       2004/12/20 10:47:05

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        WebdavServlet.java
               webapps/webdav/WEB-INF web.xml
               webapps/webdav index.html
  Log:
  Fix webDAV servlet so it can be used via any arbitrary mapping
    (eg /webdav/*) to edit the contents of a web application
  
  Revision  Changes    Path
  1.37      +2 -2      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
  
  Index: WebdavServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- WebdavServlet.java        26 Aug 2004 21:38:13 -0000      1.36
  +++ WebdavServlet.java        20 Dec 2004 18:47:05 -0000      1.37
  @@ -1962,7 +1962,7 @@
           // Generating href element
           generatedXML.writeElement(null, "href", XMLWriter.OPENING);
   
  -        String href = req.getContextPath();
  +        String href = req.getContextPath() + req.getServletPath();
           if ((href.endsWith("/")) && (path.startsWith("/")))
               href += path.substring(1);
           else
  
  
  
  1.4       +1 -1      jakarta-tomcat-4.0/webapps/webdav/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/webdav/WEB-INF/web.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- web.xml   2 Sep 2002 13:45:23 -0000       1.3
  +++ web.xml   20 Dec 2004 18:47:05 -0000      1.4
  @@ -35,7 +35,7 @@
     <!-- The mapping for the webdav servlet -->
     <servlet-mapping>
       <servlet-name>webdav</servlet-name>
  -    <url-pattern>/</url-pattern>
  +    <url-pattern>/*</url-pattern>
     </servlet-mapping>
   
     <!-- Establish the default MIME type mappings -->
  
  
  
  1.6       +13 -0     jakarta-tomcat-4.0/webapps/webdav/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/webdav/index.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.html        9 Oct 2001 02:41:21 -0000       1.5
  +++ index.html        20 Dec 2004 18:47:05 -0000      1.6
  @@ -26,6 +26,19 @@
   safety reasons. It can be put in read-write mode by editing the web 
   application descriptor file (WEB-INF/web.xml).
   
  +<p>To add remote authoring to your web application, you need to make the 
following
  +changes:
  +<ul>
  +<li>Add the webDAV servlet to your web application. See the web application
  +deployment descriptor for an example. Don't forget to make it read/write.
  +<li>Add a servlet mapping for the webDAV servlet with a url pattern of 
"/webdav/*"
  +to your web.xml.
  +<li>Add an appropriate security constraint to prevent unauthorised changes 
to your
  +web application.
  +<li>You can then edit your web application using a webDAV client using a url
  +like <font face="Courier New, 
Courier,mono">http://host:port/webapp/webdav</font></li>
  +</ul>
  +
   <p>Working WebDAV clients include :
   <ul>
   <li>Adobe GoLive 5.0 (and other WebDAV-enabled Adobe products, like
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to