Dirk Verbeeck wrote:
Bita Shadgar wrote:

> 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
 

When I try to mkcol after open the url I get this message:

[ Slide ] $ open http://localhost:8080/slide
[LOCALHOST] /slide/ $ ls
files
[LOCALHOST] /slide/ $ mkcol test
Making '/slide/test' collection: failed.
Forbidden (403)
[LOCALHOST] /slide/ $

Indeed when I try to run the SimpleClient.java I get this error message:

classes% java SimpleClient
Reopen connection : Host:localhost Port:8080

MKCOL /slide/newpath HTTP/1.1
Content-Length: 0
Host: localhost:8080
User-Agent: Jakarta HTTP Client/1.0
 

HTTP/1.0 403 Forbidden
Set-Cookie2: JSESSIONID=yreq6zfty1;Version=1;Discard;Path="/slide"
Set-Cookie: JSESSIONID=yreq6zfty1;Path=/slide
Servlet-Engine: Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java 1.2; SunOS 5.7 sparc; java.vendor=Sun Microsystems Inc.)

Closing connection
End session
Closing connection
classes%

Is something wrong with my setting. Every time I receive 403 Forbidden error.

====SimpleClient.java=======================================
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();
  }
 }

}

Any help will be appriciated.
Bita.





 

Reply via email to