## org.mortbay.servlet
Class RestFilter

    java.lang.Object
      org.mortbay.servlet.RestFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class RestFilter

extends java.lang.Object
implements javax.servlet.Filter

Support for HTTP PUT and DELETE methods.

THIS FILTER SHOULD ONLY BE USED WITH VERY GOOD SECURITY CONSTRAINTS!

If the filter init parameter maxPutSize is set to a positive integer, then only puts of known size less than maxPutSize will be accepted.

Author:
  Aleksi Kallio

Constructor Summary
`RestFilter()`

Method Summary
`void` `destroy()`
`protected void` `doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`void` `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
`protected void` `doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`void` `init(javax.servlet.FilterConfig filterConfig)`

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

Constructor Detail

### RestFilter

    public RestFilter()

Method Detail

### init

    public void init(javax.servlet.FilterConfig filterConfig)
              throws javax.servlet.UnavailableException

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.UnavailableException`

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         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`

### doPut

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

  Parameters:
    `request` -
    `response` -
  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### doDelete

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

  Parameters:
    `request` -
    `response` -
  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `javax.servlet.Filter`

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