[opencms-dev] RE: writing a file as a guest
Brabenetz, Harald
harald.brabenetz at bearingpoint.com
Fri Mar 17 12:39:31 CET 2006
Hi,
I would do the following:
Create a Module-Action (org.opencms.module.A_CmsModuleAction) and implement the Funktion
#initialize(CmsObject adminCms, CmsConfigurationManager configurationManager, CmsModule module);
This function will be called on startup of the Web-Application (before anyone can login).
So you can get an own instance of the Admin-CmsObject.
1. store this adminCms-Objact as
privat static CmsObject adminCms;
2. implement a function like:
public static void writeVisitorLogEntry(....) //maybe synchronized ?
{
//use the adminCms to write the File
}
I hope it can help you.
I also hope that the implementation is correct :-).
Harald
-----Original Message-----
Patrick-Emil Zörner paddyez at gmail.com
Thu Mar 16 15:55:32 CET 2006
--------------------------------------------------------------------------------
Hi,
I am trying to write some data to a cmsFile as a guest user. I set the
permissions for the tmp dir so that guest my do anything in the dir.
As admin it is no problem to do so but the guest throws 2 exceptions:
org.opencms.file.CmsVfsException: Error locking resource
"/DI.MAS/tmp/statistics/visitorsLog_2006_03_16.csv" with mode
"CmsLock.C_MODE_COMMON".
and
org.opencms.file.CmsVfsException: Error writing the file
"/DI.MAS/tmp/statistics/visitorsLog_2006_03_16.csv".
any idea how to solve this problem?
greetings
paddy
***************************************************************************************************
The information in this email is confidential and may be legally privileged. Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.
***************************************************************************************************
More information about the opencms-dev
mailing list