## org.mortbay.servlet
Class PutFilter

    java.lang.Object
      org.mortbay.servlet.PutFilter

All Implemented Interfaces:
  Filter

    public class PutFilter

extends Object
implements Filter

PutFilter A Filter that handles PUT, DELETE and MOVE methods. Files are hidden during PUT operations, so that 404's result. The following init paramters pay be used:

- baseURI - The file URI of the document root for put content.
- delAllowed - boolean, if true DELETE and MOVE methods are supported.

Field Summary
`static String` `__DELETE`
`static String` `__MOVE`
`static String` `__OPTIONS`
`static String` `__PUT`
`protected String` `_baseURI`
`protected ServletContext` `_context`
`protected boolean` `_delAllowed`
`protected ConcurrentMap` `_hidden`

Constructor Summary
`PutFilter()`

Method Summary
`void` `destroy()`
`void` `doFilter(ServletRequest req, ServletResponse res, FilterChain chain)`
`void` `handleDelete(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file)`
`void` `handleMove(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file)`
`void` `handleOptions(HttpServletRequest request, HttpServletResponse response)`
`void` `handlePut(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file)`
`void` `init(FilterConfig config)`
`protected boolean` `passConditionalHeaders(HttpServletRequest request, HttpServletResponse response, File file)`

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

Field Detail

### __PUT

    public static final String __PUT

See Also:
  Constant Field Values

### __DELETE

    public static final String __DELETE

See Also:
  Constant Field Values

### __MOVE

    public static final String __MOVE

See Also:
  Constant Field Values

### __OPTIONS

    public static final String __OPTIONS

See Also:
  Constant Field Values

### _hidden

    protected ConcurrentMap _hidden

### _context

    protected ServletContext _context

### _baseURI

    protected String _baseURI

### _delAllowed

    protected boolean _delAllowed

Constructor Detail

### PutFilter

    public PutFilter()

Method Detail

### init

    public void init(FilterConfig config)
              throws ServletException

  Specified by:
    `init` in interface `Filter`
  Throws:
    `ServletException`

### doFilter

    public void doFilter(ServletRequest req,
                         ServletResponse res,
                         FilterChain chain)
                  throws IOException,
                         ServletException

  Specified by:
    `doFilter` in interface `Filter`
  Throws:
    `IOException`
    `ServletException`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `Filter`

### handlePut

    public void handlePut(HttpServletRequest request,
                          HttpServletResponse response,
                          String pathInContext,
                          File file)
                   throws ServletException,
                          IOException

  Throws:
    `ServletException`
    `IOException`

### handleDelete

    public void handleDelete(HttpServletRequest request,
                             HttpServletResponse response,
                             String pathInContext,
                             File file)
                      throws ServletException,
                             IOException

  Throws:
    `ServletException`
    `IOException`

### handleMove

    public void handleMove(HttpServletRequest request,
                           HttpServletResponse response,
                           String pathInContext,
                           File file)
                    throws ServletException,
                           IOException,
                           URISyntaxException

  Throws:
    `ServletException`
    `IOException`
    `URISyntaxException`

### handleOptions

    public void handleOptions(HttpServletRequest request,
                              HttpServletResponse response)
                       throws IOException

  Throws:
    `IOException`

### passConditionalHeaders

    protected boolean passConditionalHeaders(HttpServletRequest request,
                                             HttpServletResponse response,
                                             File file)
                                      throws IOException

  Throws:
    `IOException`

Copyright © 1995-2008 Mort Bay Consulting. All Rights Reserved.