WebdavServlet (Tomcat API Documentation)
Keywords: org.apache.catalina.servlets.WebdavServlet class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.servlets
Class WebdavServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              org.apache.catalina.servlets.DefaultServlet
                  org.apache.catalina.servlets.WebdavServlet

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class WebdavServlet
extends DefaultServlet

Servlet which adds support for WebDAV level 2. All the basic HTTP requests are handled by the DefaultServlet. Check out http://issues.apache.org/bugzilla/show_bug.cgi?id=40160 for a Filter that allows you to map this servlet anywhere inside a web application, not just the /* URL pattern.

Version:
  $Id: WebdavServlet.java 939529 2010-04-30 00:51:34Z kkolinko $
Author:
  Remy Maucherat
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class org.apache.catalina.servlets.DefaultServlet
`DefaultServlet.Range`

Field Summary
`protected static java.text.SimpleDateFormat` | `creationDateFormat` Simple date format for the creation date ISO representation (partial).
`protected static java.lang.String` | `DEFAULT_NAMESPACE` Default namespace.
`protected static MD5Encoder` | `md5Encoder` The MD5 helper object for this class.
`protected static java.security.MessageDigest` | `md5Helper` MD5 message digest provider.

Fields inherited from class org.apache.catalina.servlets.DefaultServlet
`BUFFER_SIZE, debug, fileEncoding, FULL, globalXsltFile, input, listings, localXsltFile, mimeSeparation, output, readmeFile, readOnly, resources, RESOURCES_JNDI_NAME, sendfileSize, sm, urlEncoder, useAcceptRanges`

Constructor Summary
`WebdavServlet()`

Method Summary
`protected boolean` | `checkIfHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ResourceAttributes resourceAttributes)` Check if the conditions specified in the optional If headers are satisfied.
`protected void` | `doCopy(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` COPY Method.
`protected void` | `doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` DELETE Method.
`protected void` | `doLock(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` LOCK Method.
`protected void` | `doMkcol(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` MKCOL Method.
`protected void` | `doMove(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` MOVE Method.
`protected void` | `doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` OPTIONS Method.
`protected void` | `doPropfind(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` PROPFIND Method.
`protected void` | `doProppatch(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` PROPPATCH Method.
`protected void` | `doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Process a POST request for the specified resource.
`protected void` | `doUnlock(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` UNLOCK Method.
`protected javax.xml.parsers.DocumentBuilder` | `getDocumentBuilder()` Return JAXP document builder instance.
`protected java.lang.String` | `getRelativePath(javax.servlet.http.HttpServletRequest request)` Override the DefaultServlet implementation and only use the PathInfo.
`void` | `init()` Initialize this servlet.
`protected void` | `service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Handles the special WebDAV methods.

Methods inherited from class org.apache.catalina.servlets.DefaultServlet
`checkIfMatch, checkIfModifiedSince, checkIfNoneMatch, checkIfUnmodifiedSince, checkSendfile, copy, copy, copy, copy, copy, copy, copyRange, copyRange, copyRange, copyRange, destroy, displaySize, doGet, doHead, doPost, executePartialPut, findXsltInputStream, getETag, getReadme, parseContentRange, parseRange, render, renderHtml, renderSize, renderXml, rewriteUrl, serveResource`

Methods inherited from class javax.servlet.http.HttpServlet
`doTrace, getLastModified, service`

Methods inherited from class javax.servlet.GenericServlet
`getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_NAMESPACE

    protected static final java.lang.String DEFAULT_NAMESPACE

  Default namespace.

  See Also:
    Constant Field Values

### creationDateFormat

    protected static final java.text.SimpleDateFormat creationDateFormat

  Simple date format for the creation date ISO representation (partial).

### md5Helper

    protected static java.security.MessageDigest md5Helper

  MD5 message digest provider.

### md5Encoder

    protected static final MD5Encoder md5Encoder

  The MD5 helper object for this class.

Constructor Detail

### WebdavServlet

    public WebdavServlet()

Method Detail

### init

    public void init()
              throws javax.servlet.ServletException

  Initialize this servlet.

  Overrides:
    `init` in class `DefaultServlet`
  Throws:
    `javax.servlet.ServletException`

### getDocumentBuilder

    protected javax.xml.parsers.DocumentBuilder getDocumentBuilder()
                                                            throws javax.servlet.ServletException

  Return JAXP document builder instance.

  Throws:
    `javax.servlet.ServletException`

### service

    protected void service(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse resp)
                    throws javax.servlet.ServletException,
                           java.io.IOException

  Handles the special WebDAV methods.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### checkIfHeaders

    protected boolean checkIfHeaders(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response,
                                     ResourceAttributes resourceAttributes)
                              throws java.io.IOException

  Check if the conditions specified in the optional If headers are satisfied.

  Overrides:
    `checkIfHeaders` in class `DefaultServlet`
  Parameters:
    `request` - The servlet request we are processing
    `response` - The servlet response we are creating
    `resourceAttributes` - The resource information
  Returns:
    boolean true if the resource meets all the specified conditions, and false if any of the conditions is not satisfied, in which case request processing is stopped
  Throws:
    `java.io.IOException`

### getRelativePath

    protected java.lang.String getRelativePath(javax.servlet.http.HttpServletRequest request)

  Override the DefaultServlet implementation and only use the PathInfo. If the ServletPath is non-null, it will be because the WebDAV servlet has been mapped to a url other than /* to configure editing at different url than normal viewing.

  Overrides:
    `getRelativePath` in class `DefaultServlet`
  Parameters:
    `request` - The servlet request we are processing

### doOptions

    protected void doOptions(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse resp)
                      throws javax.servlet.ServletException,
                             java.io.IOException

  OPTIONS Method.

  Overrides:
    `doOptions` in class `DefaultServlet`
  Parameters:
    `req` - The request
    `resp` - The response
  Throws:
    `javax.servlet.ServletException` - If an error occurs
    `java.io.IOException` - If an IO error occurs

### doPropfind

    protected void doPropfind(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              java.io.IOException

  PROPFIND Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doProppatch

    protected void doProppatch(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse resp)
                        throws javax.servlet.ServletException,
                               java.io.IOException

  PROPPATCH Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doMkcol

    protected void doMkcol(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse resp)
                    throws javax.servlet.ServletException,
                           java.io.IOException

  MKCOL Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doDelete

    protected void doDelete(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp)
                     throws javax.servlet.ServletException,
                            java.io.IOException

  DELETE Method.

  Overrides:
    `doDelete` in class `DefaultServlet`
  Parameters:
    `req` - The servlet request we are processing
    `resp` - The servlet response we are creating
  Throws:
    `javax.servlet.ServletException` - if a servlet-specified error occurs
    `java.io.IOException` - if an input/output error occurs

### doPut

    protected void doPut(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws javax.servlet.ServletException,
                         java.io.IOException

  Process a POST request for the specified resource.

  Overrides:
    `doPut` in class `DefaultServlet`
  Parameters:
    `req` - The servlet request we are processing
    `resp` - The servlet response we are creating
  Throws:
    `java.io.IOException` - if an input/output error occurs
    `javax.servlet.ServletException` - if a servlet-specified error occurs

### doCopy

    protected void doCopy(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse resp)
                   throws javax.servlet.ServletException,
                          java.io.IOException

  COPY Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doMove

    protected void doMove(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse resp)
                   throws javax.servlet.ServletException,
                          java.io.IOException

  MOVE Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doLock

    protected void doLock(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse resp)
                   throws javax.servlet.ServletException,
                          java.io.IOException

  LOCK Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doUnlock

    protected void doUnlock(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp)
                     throws javax.servlet.ServletException,
                            java.io.IOException

  UNLOCK Method.

  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.