Dirk Verbeeck wrote:

> Bita Shadgar wrote:
>
> > > Here is how you have to extend the WebdavServlet:
> > > 1) compile the attached SimpleServlet
> > > 2) copy it here: webapps\slide\WEB-INF\classes\SimpleServlet.class
> > > 3) modify: webapps\slide\WEB-INF\web.xml
> > > change:
> > >   <servlet-class>org.apache.slide.webdav.WebdavServlet</servlet-class>
> >
> > >
> > > to:
> > >   <servlet-class>SimpleServlet</servlet-class>
> > >
> > > Now when you request a directory listing, the following text is
> > printed
> > > on the top of the page
> > > "This my servlet and not the default one"
> >
> > Thanks for your help Remy. I have done  all above steps. Now, I can see
> > your SimpleServlet page as you expected. Indeed I saw my
> > SimpleServletForGet  servlet but again by changing :
> >                  <servlet-class>SimpleServlet</servlet-class>
> > to:
> >                  <servlet-class>SimpleServletForGet</servlet-class>
> > Is there any reasonable way?
>
> This is the way to extend the default webdav servlet.
> You replace the default one with your own.
> But maybe you want do do something else... like making a web based    webdav
> client ???
>
> > Still I don't know how I can MKCOL a resource, then PropPatch some
> > properties on it , and then PropGet these properties in three different
> > way as mentioned in RFC2518 by servlets.
>
> If you want to extend the webdav servlet you have to use slide functions to
> do your actions.
> Something like "locksList = lock.enumerateLocks(slideToken,
> object.getUri());"
>
> > Further more, If I want to use of slide's webdav client to uses of
> > webdav methods as long as servlets, what should I do?
>
> I don't understand that sentence but if you want to make a web based webdav
> client
> start with the attached example and later make a jsp or servlet.
> By using the client api, you can use wabdav function like propfind.
>
> > I had installed slide 1.0.11 before and I could create mkcol, proppatch
> > and propget by using the run.sh in client/bin directory and also make
> > them persistent into a database. Do you know how can I use the slide's
> > webdav client with jakarta-tomcat-3.2.3.
>
> just copy slide.war in the webapps directory (and restart) and do
> "open http://localhost:8080/slide"; in the command line client
>
> Maybe you can explain a bit what you are trying to do. I have read your
> thesis proposal
> http://www.cs.bris.ac.uk/~shadgar/thesis.html
>
> The first part sound like you want to make that web based webdav client
> there are 2 ways of doing that:
>     - extending the webdav servlet like we started but then you have to use
> slide functions
>     - make a seperate!!! webapp that uses the slide client api to connect to
> a webdav server
>       (you have an extra network connection but you can use webdav functions
> to implement everything)
>       (but you have the advantage that you can restart your client webapp
> without restarting you repository)
>
> The second part of your thesis (if you are going to use slide for that as
> well) will be more interresting.
> Are you going to use slide for that as well or simply make some jsp pages ?
>
> Dirk
>
> ===========================================
> import java.io.*;
> import java.util.*;
> import java.net.*;
> import org.apache.webdav.lib.WebdavResource;
> import org.apache.webdav.lib.ResponseEntity;
> import org.apache.webdav.lib.Property;
> import org.apache.webdav.lib.methods.MkcolMethod;
> import org.apache.util.HttpURL;
> import org.apache.commons.httpclient.*;
> import org.apache.commons.httpclient.methods.*;
>
> public class SimpleClient {
>
>     public SimpleClient() { }
>
>  public static void main(String[] args)
>  {
>   try
>   {
>    HttpClient client=new HttpClient();
>    client.startSession("localhost",8080,new Credentials("dirk","dirk"));
>    client.setDebug(10);
>
>    MkcolMethod mc=new MkcolMethod();
>    mc.setPath("/slide/files/newpath");
>    client.executeMethod(mc);
>    client.endSession();
>   }
>   catch (Exception ex)
>   {
>    ex.printStackTrace();
>   }
>  }
>
> }

Thanks Dirk for your support. Most of stuff in my thesis about files and
directories
already has done by Slide. At present I am trying to work on the second part by
programming with slide libraries.

Again I do appreciate you attention.

Bita.



Reply via email to