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 Anupam Vaval <av...@ecredit.com> on 2004/10/04 15:15:23 UTC
Put operation for locked file
Hi
I am new to slide apis.
I am using slide client ( jakarta-slide-webdavclient-bin-2.0 )
slide server ( tomcat environment )
Is there any sample code to perform put operation on locked file ?
I tried following code but doesn't seem to work
httpURL = new HttpURL( "http://localhost:8080/slide/files/"
);
httpURL.setUserinfo("test", "password");
//put resource
wdr = new WebdavResource( httpURL );
fileInstance = new File("C:\\temp\\slide\\a.txt");
success = wdr.putMethod( "/slide/files/" +
fileInstance.getName(), fileInstance );
if ( success )
{
log( "put file in /slide/files/ ");
}
else
{
String status = wdr.getStatusMessage();
System.err.println("status=" + status);
throw new RuntimeException( "Error creating file at
/slide/files/");
}
Thanks in advance.
Regards
AV
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org