org.eclipse.jetty.servlets
Class PutFilter
java.lang.Object
org.eclipse.jetty.servlets.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 parameters pay be used:
- baseURI - The file URI of the document root for put content.
- delAllowed - boolean, if true DELETE and MOVE methods are supported.
- putAtomic - boolean, if true PUT files are written to a temp location and moved into place.
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(FilterChain chain,
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 |
__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
PutFilter
public PutFilter()
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(FilterChain chain,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
- Throws:
IOException
ServletException
passConditionalHeaders
protected boolean passConditionalHeaders(HttpServletRequest request,
HttpServletResponse response,
File file)
throws IOException
- Throws:
IOException
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.