Re: 400 bad request error
Ali Naddaf <[email protected]> Tue, 27 Mar 2007 22:21:48 -0500
| Newsgroups | gmane.comp.jakarta.slide.user |
|---|---|
| Message-ID | <[email protected]> |
Yes, that didn't help. In fact, based on the error and where it was
being reported at, it never got passed the resource creation. I guess I
have figured out the main cause: I had some other commons-httpclient jar
in my classpath and I believe that was causing the issue.
Thanks
Ali.
aslam bari wrote:
> Have you tried to give credentials with request like ("root","root" or "john","john") etc.
>
>
> ----- Original Message ----
> From: Ali Naddaf <[email protected]>
> To: [email protected]
> Sent: Wednesday, 28 March, 2007 1:55:43 AM
> Subject: 400 bad request error
>
>
> Hello everyone.
> I just started using slide + slide-client and am running into a basic
> issue that doesn't allow me go any further. I downloaded slide server
> (binary, version 2.1) and dropped the war in my webapp directory of
> tomcat (5.5.23). Then I was able to access the WebDAV file system using
> my Windows explorer; I was be to drop a file there and get a file. So
> that makes me think that the server side is working fine.
>
> Then I downloaded the slide-webdav-client (2.1) and tried to run the
> following code:
>
> ---------------------------------
> public static void main(String[] args) {
> try
> {
> HttpURL url = new HttpURL("http://localhost:8080/slide/files";);
> WebdavResource res = new WebdavResource(url);
> File file = new File("C:/temp.zip");
> res.putMethod(file);
> res.close();
> }
> catch(Exception e) {
> e.printStackTrace();
> }
> }
> -------------------------------
>
> but at the line that I am creating the webdav resource, it fails and on
> the server log, I see the following error:
> http-8080-Processor25, 27-Mar-2007 14:14:26, unauthenticated, PROPFIND,
> 400 "Bad Request", 0 ms, /files
>
> and in my java code, the following stack:
> --------------------------------
> org.apache.commons.httpclient.HttpException
> at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3467)
> at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3423)
> at
> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:967)
> at
> org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:912)
> at
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1894)
> at
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1301)
> at
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1320)
> at
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1408)
> at org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:290)
> at com.dawnatech.cyclops.webdav.WebDAVTest.main(WebDAVTest.java:16)
> ------------------------------------
>
> Could someone please tell me what I am missing?
>
> Many thanks,
> Ali.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> __________________________________________________________
> Yahoo! India Answers: Share what you know. Learn something new
> http://in.answers.yahoo.com/
>