Package 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.
-
-
Constructor Summary
Constructors Constructor Description PutFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()voiddoFilter(ServletRequest req, ServletResponse res, FilterChain chain)voidhandleDelete(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file)voidhandleMove(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file)voidhandleOptions(FilterChain chain, HttpServletRequest request, HttpServletResponse response)voidhandlePut(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file)voidinit(FilterConfig config)protected booleanpassConditionalHeaders(HttpServletRequest request, HttpServletResponse response, File file)
-
-
-
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
-
-
Method Detail
-
init
public void init(FilterConfig config) throws ServletException
- Specified by:
initin interfaceFilter- Throws:
ServletException
-
doFilter
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException
- Specified by:
doFilterin interfaceFilter- Throws:
IOExceptionServletException
-
handlePut
public void handlePut(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file) throws ServletException, IOException
- Throws:
ServletExceptionIOException
-
handleDelete
public void handleDelete(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file) throws ServletException, IOException
- Throws:
ServletExceptionIOException
-
handleMove
public void handleMove(HttpServletRequest request, HttpServletResponse response, String pathInContext, File file) throws ServletException, IOException, URISyntaxException
-
handleOptions
public void handleOptions(FilterChain chain, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
- Throws:
IOExceptionServletException
-
passConditionalHeaders
protected boolean passConditionalHeaders(HttpServletRequest request, HttpServletResponse response, File file) throws IOException
- Throws:
IOException
-
-