public class WebDavServlet extends GenericServlet
More sophisticated users can customize AbstractPath to provide their own WebDAV view for their objects, much like the Linux /proc filesystem provides a view to Linux kernel modules.
<resource-ref res-ref-name='resin/webdav'>
<class-name>test.foo.MyDataSource</class-name>
<init-param my-foo='bar'/>
</resource-ref>
<servlet-mapping url-pattern='/webdav/*'
servlet-name='com.caucho.http.webdav.WebDavServlet'>
<init-param enable='write'/>
<init-param path-source='resin/webdav'/>
</servlet-mapping>
| Constructor and Description |
|---|
WebDavServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Called when the servlet (and the application) shuts down.
|
protected java.lang.String |
getParent(java.lang.String pathInfo) |
void |
init()
Initialize the servlet.
|
protected java.lang.String |
lookup(java.lang.String parent,
java.lang.String child) |
protected void |
sendError(HttpServletResponse res,
WriteStream out,
int status,
java.lang.String statusText,
java.lang.String message) |
void |
service(ServletRequest request,
ServletResponse response)
Service the webdav request.
|
void |
setCrLf(boolean addCrLf)
Sets true if should add cr/lf
|
void |
setEnable(java.lang.String enable)
Sets the enable value.
|
void |
setPathSource(AbstractPath path)
Sets the path.
|
void |
setRole(java.lang.String role)
Sets the allowed role.
|
void |
setRoot(java.lang.String root)
Sets the root.
|
void |
setSecure(boolean needsSecure)
Set true for securted.
|
void |
setUser(java.lang.String user)
Sets the allowed user.
|
protected void |
startMultistatus(HttpServletResponse res,
WriteStream out) |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, toStringpublic void setEnable(java.lang.String enable)
public void setRole(java.lang.String role)
public void setUser(java.lang.String user)
public void setSecure(boolean needsSecure)
public void setPathSource(AbstractPath path)
public void setRoot(java.lang.String root)
public void setCrLf(boolean addCrLf)
public void init()
throws ServletException
GenericServletinit in class GenericServletServletExceptionpublic void service(ServletRequest request, ServletResponse response) throws ServletException, java.io.IOException
request - request information. Normally servlets will cast this
to HttpServletRequestresponse - response information. Normally servlets will cast this
to HttpServletRequestServletExceptionjava.io.IOExceptionprotected void startMultistatus(HttpServletResponse res, WriteStream out) throws java.io.IOException
java.io.IOExceptionprotected void sendError(HttpServletResponse res, WriteStream out, int status, java.lang.String statusText, java.lang.String message) throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getParent(java.lang.String pathInfo)
protected java.lang.String lookup(java.lang.String parent,
java.lang.String child)
public void destroy()
GenericServletdestroy in interface Servletdestroy in class GenericServlet