You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Huy Tri <tr...@kimdo.com.vn> on 2001/10/01 07:01:40 UTC
WebDavResource
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 request
log3: 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.
Re: WebDavResource
Posted by Dirk Verbeeck <di...@pandora.be>.
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.