Hi
The path argument of putmethod should include the filename.
if (!folder.putMethod(folder.getPath() + "/" + filename,file)) {
Take a look at the slide client for a large example
jakarta-slide\src\webdav\client\src\org\apache\webdav\cmd\Slide.java
Dirk
Huy Tri wrote:
> I have a problems using this putMethod() methods, everytime I tried to
> use
> them, I received an exception with the webdavressource and there is no
>
> samples codes so if anybody knows well the
> apache.commons.httpclient...
>
> org.apache.webdav.lib.WebdavResource folder = new
> org.apache.webdav.lib.WebdavResource(http://localhost:8080/ifs/);
> folder.setUserInfo('tri','tri'); File file = new File(filename);
> if (!folder.putMethod(folder.getPath(),file)) {
> } i get message :
> og3: Unable to process requestlog3:
> org.apache.commons.httpclient.HttpException: Unable to process request
>
> void
>
>org.apache.commons.httpclient.HttpClient.executeMethod(org.apache.commons.httpclient.HttpMethod)log3:
>
> boolean
> org.apache.webdav.lib.WebdavResource.putMethod(java.lang.String,
> java.io.File)log3:
>
> Thanks.