net.java.dev.webdav.interop
Class WindowsRedirectorPatchResourceFilter

java.lang.Object
  extended by net.java.dev.webdav.interop.WindowsRedirectorPatchResourceFilter
All Implemented Interfaces:
javax.servlet.Filter

public class WindowsRedirectorPatchResourceFilter
extends java.lang.Object
implements javax.servlet.Filter

This Servlet-Filter should several problems, which were found when working with Windows-Clients and a WebDAV-compliant Server. Microsoft needs at least a DAV-enabled response, when trying a request to the Root of your Server (http://example.com/). For a successful PROPFIND request, the returned XML has to use XML-Namespaces. Due the fact that JAX-B doesn't require Namespaces, we use XSLT to transform it to a "correct" XML. If you don't want to use the filter for that you can add an empty class to your JAXB-Context. This will force JAXB to create namespaces.

Author:
Daniel MANZKE (daniel.manzke@googlemail.com), Markus KARG

Field Summary
static java.lang.String DAV
           
static java.lang.String MS_AUTHOR_VIA
           
static java.lang.String ROOT_RESOURCE
           
 
Constructor Summary
WindowsRedirectorPatchResourceFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain)
           
 void init(javax.servlet.FilterConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MS_AUTHOR_VIA

public static final java.lang.String MS_AUTHOR_VIA
See Also:
Constant Field Values

DAV

public static final java.lang.String DAV
See Also:
Constant Field Values

ROOT_RESOURCE

public static final java.lang.String ROOT_RESOURCE
See Also:
Constant Field Values
Constructor Detail

WindowsRedirectorPatchResourceFilter

public WindowsRedirectorPatchResourceFilter()
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest servletRequest,
                     javax.servlet.ServletResponse servletResponse,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException


Copyright © 2008-2009 The java.net WebDAV Project. All Rights Reserved.