FW: [opencms-dev] External_new_upload ... More specific + CmsObje ct from other webapp??
Vlachogiannis Evangelos
evlach at aegean.gr
Tue Oct 7 15:13:01 CEST 2003
Hi again,
To make my question more specific when I am using an CmsObject is it enough
to use CmsObject.login ... Method in order to be able to acccess any
resource accessible from the logged in user?
Another question: Is there a way of getting and using the CmsObject from
another web application (serialization?... Any suggestion??) ?
Thnx Vangelis
-----Original Message-----
From: Vlachogiannis Evangelos [mailto:evlach at aegean.gr]
Sent: Tuesday, October 07, 2003 1:26 AM
To: 'opencms-dev at opencms.org'
Subject: [opencms-dev] External_new_upload
Hi all,
I am trying to upload/unlock/publish a resource at once from outside
jetspeed. I have created a class/action/template (attached) like
CmsNewResourceUpload containing the following code:
cms.loginUser("admin","admin");
System.out.println("trying to create..."); cms.createResource(currentFolder
+ filename, type.getResourceTypeName(), new Hashtable(), filecontent, null);
System.out.println("created..."); cms.unlockResource( currentFolder +
filename );
cms.publishResource( currentFolder + filename);
What I am getting is no uploaded file and the following console message:
step: 2
filename: New_Text_Document.txt
currentFolder: /release/
title: null
newtype: plain
overwrite: false
cancel: false
Step2@@@@@@@@@
logged in suc
trying to create...
com.opencms.core.CmsException: 1 Access denied. Detailed error:
[com.opencms.file.mySql.CmsResourceBroker]
/default/vfs/release/New_Text_Document.txt.
Could anyone help me please?
Thnx in advance,
Vangelis
More information about the opencms-dev
mailing list