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/01 18:29:21 UTC
Put file when it is locked in repository
Hi
I am using Slide client apis ( jakarta-slide-2.0-tomcat-5.0.19 )
to get file that is locked in repository.
I looked at explorer log messages and realized that I need to add
header to Get request.
How do I add If opaquelocktoken header to request so that I can
get file ?
Code is as follows
HttpURL httpURL = null;
WebdavResource wdr = null;
httpURL = new HttpURL( "http://localhost:8080/slide/files/"
);
httpURL.setUserinfo("test", "test");
//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/");
}
I am getting status as status=Locked (423)
Any help is appreciated.
Regards
AV
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org