Class AbstractWebdavServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.jackrabbit.webdav.server.AbstractWebdavServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig, DavConstants

public abstract class AbstractWebdavServlet extends HttpServlet implements DavConstants
AbstractWebdavServlet

See Also:
  • Field Details

    • INIT_PARAM_MISSING_AUTH_MAPPING

      public static final String INIT_PARAM_MISSING_AUTH_MAPPING
      the 'missing-auth-mapping' init parameter
      See Also:
    • INIT_PARAM_AUTHENTICATE_HEADER

      public static final String INIT_PARAM_AUTHENTICATE_HEADER
      Name of the optional init parameter that defines the value of the 'WWW-Authenticate' header.

      If the parameter is omitted the default value "Basic Realm=Jackrabbit Webdav Server" is used.

      See Also:
    • DEFAULT_AUTHENTICATE_HEADER

      public static final String DEFAULT_AUTHENTICATE_HEADER
      Default value for the 'WWW-Authenticate' header, that is set, if request results in a 401 (Unauthorized) error.
      See Also:
    • INIT_PARAM_CSRF_PROTECTION

      public static final String INIT_PARAM_CSRF_PROTECTION
      Name of the parameter that specifies the configuration of the CSRF protection. May contain a comma-separated list of allowed referrer hosts. If the parameter is omitted or left empty the behaviour is to only allow requests which have an empty referrer or a referrer host equal to the server host. If the parameter is set to 'disabled' no referrer checks will be performed at all.
      See Also:
    • INIT_PARAM_CREATE_ABSOLUTE_URI

      public static final String INIT_PARAM_CREATE_ABSOLUTE_URI
      Name of the 'createAbsoluteURI' init parameter that defines whether hrefs should be created with a absolute URI or as absolute Path (ContextPath). The value should be 'true' or 'false'. The default value if not set is true.
      See Also:
  • Constructor Details

    • AbstractWebdavServlet

      public AbstractWebdavServlet()
  • Method Details

    • init

      public void init() throws ServletException
      Description copied from class: GenericServlet
      A convenience method which can be overridden so that there's no need to call super.init(config).

      Instead of overriding GenericServlet.init(ServletConfig), simply override this method and it will be called by GenericServlet.init(ServletConfig config). The ServletConfig object can still be retrieved via GenericServlet.getServletConfig().

      Overrides:
      init in class GenericServlet
      Throws:
      ServletException - if an exception occurs that interrupts the servlet's normal operation
    • getDavSessionProvider

      public abstract DavSessionProvider getDavSessionProvider()
      Returns the DavSessionProvider.
      Returns:
      the session provider
    • setDavSessionProvider

      public abstract void setDavSessionProvider(DavSessionProvider davSessionProvider)
      Returns the DavSessionProvider.
      Parameters:
      davSessionProvider -
    • getLocatorFactory

      public abstract DavLocatorFactory getLocatorFactory()
      Returns the DavLocatorFactory.
      Returns:
      the locator factory
    • setLocatorFactory

      public abstract void setLocatorFactory(DavLocatorFactory locatorFactory)
      Sets the DavLocatorFactory.
      Parameters:
      locatorFactory -
    • getResourceFactory

      public abstract DavResourceFactory getResourceFactory()
      Returns the DavResourceFactory.
      Returns:
      the resource factory
    • setResourceFactory

      public abstract void setResourceFactory(DavResourceFactory resourceFactory)
      Sets the DavResourceFactory.
      Parameters:
      resourceFactory -
    • getAuthenticateHeaderValue

      public String getAuthenticateHeaderValue()
      Returns the value of the 'WWW-Authenticate' header, that is returned in case of 401 error: the value is retrireved from the corresponding init param or defaults to DEFAULT_AUTHENTICATE_HEADER.
      Returns:
      corresponding init parameter or DEFAULT_AUTHENTICATE_HEADER.
      See Also:
    • getContentCodings

      public static List<String> getContentCodings(HttpServletRequest request)
      Obtain the (ordered!) list of content codings that have been used in the request