Package org.eclipse.jetty.servlets
Class PutFilter
- java.lang.Object
-
- org.eclipse.jetty.servlets.PutFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class PutFilter extends Object implements javax.servlet.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 void
destroy()
void
doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
void
handleDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pathInContext, File file)
void
handleMove(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pathInContext, File file)
void
handleOptions(javax.servlet.FilterChain chain, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
handlePut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pathInContext, File file)
void
init(javax.servlet.FilterConfig config)
protected boolean
passConditionalHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.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(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Filter
-
handlePut
public void handlePut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pathInContext, File file) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletException
IOException
-
handleDelete
public void handleDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pathInContext, File file) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletException
IOException
-
handleMove
public void handleMove(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pathInContext, File file) throws javax.servlet.ServletException, IOException, URISyntaxException
- Throws:
javax.servlet.ServletException
IOException
URISyntaxException
-
handleOptions
public void handleOptions(javax.servlet.FilterChain chain, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
passConditionalHeaders
protected boolean passConditionalHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, File file) throws IOException
- Throws:
IOException
-
-