You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Christian Peter <cp...@rostock.igd.fhg.de> on 2003/03/04 11:43:19 UTC

extending the WebdavServlet

Hi,

just a short question. The readme.txt to the SimpleWebdavServlet 
example states that one "can only change doGet and doPost, not the 
other WebDAV specific methods" since "operations on files always go 
to the original WebdavServlet". Is this meant only for this 
SimpleWebdavServlet example, or is it generally "not possible" to 
change the webdav behaviour of Slide?

Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: extending the WebdavServlet

Posted by Christopher Lenz <cm...@gmx.de>.
Hi Christian,

the WebdavServlet overrides the HttpServlet.service() method, which by 
default dispatches to the doXXX() methods. However, it is implemented in 
such a way that doGet() and doPost() are only called on collections. All 
other requests are dispatched to implementations of the WebdavMethod 
interface. The instance/implementation of WebdavMethod to dispatch to is 
determined by a pluggable WebdavMethodFactory.

So to change the behaviour of Slide's WebdavServlet you should supply 
your own WebdavMethodFactory implementation (IIRC, there's a init-param 
for that), probably derived from the DefaultWebdavMethodFactory, AND 
provide one or more customized WebdavMethod implementations, probably 
derived from the respective default implementation of the method in Slide.

This should become clear when you have a look at the WebdavServlet 
source directly.

-chris

Christian Peter wrote:
> Hi,
> 
> just a short question. The readme.txt to the SimpleWebdavServlet example 
> states that one "can only change doGet and doPost, not the other WebDAV 
> specific methods" since "operations on files always go to the original 
> WebdavServlet". Is this meant only for this SimpleWebdavServlet example, 
> or is it generally "not possible" to change the webdav behaviour of Slide?
> 
> Christian




---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org