[opencms-dev] Unlock file by jsp code

Phan Dang Dinh phan_dang_dinh at yahoo.co.uk
Thu Jul 29 08:31:01 CEST 2004


Hi all,
I wrote a Jsp file to create a file in VFS. After
created, that file was locked by owner. How can I
unlock that file by jsp code?
Thanks experts
Dinh


String file_name=request.getParameter("file_name");

//out.println(request.getParameter("content"));
CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);
CmsObject cmsobj = cms.getCmsObject();
String foldername = "/release/";
CmsFile file;
try{
      String content =
request.getParameter("content");
     
cmsobj.createFile(foldername,file_name,content.getBytes(),"plain");
      file = cmsobj.readFile(foldername + file_name);
}catch(CmsException e){
out.println(e.getMessage());
}



	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com



More information about the opencms-dev mailing list