[opencms-dev] access to CmsObject
hernan.leoni at globant.com
Sun Feb 8 18:15:28 CET 2009
Thanks, sure, I'm using that in other places y my system, the most of
the time in tests, but I'm trying to ger the CmsObject when the person
is already logged in, the scenario would be:
- the user access the opencms console (log in)
- clicks on a resource which gets rendered in an html
- the html page has dwr-ajax code which generates a request to the dwr
- the dwr service needs the CmsObject, the user is already logged in,
so, I don't want to use loginUser again, and actually, I should not have
the password every time.
Mathias Lin|SYSVISION wrote:
> Hi Hernan,
> I use Spring w/ OpenCms but not DWR.
> The CmsObject can be initialized as follows:
> CmsObject cmsObj =
> ...and then do something like login for example...
> String s = cmsObj.loginUser("Admin", "admin");
> Hernán Leoni wrote:
>> I'm working with opencms and dwr + spring.
>> I'm doing it quite well, but at this moment I'm stuck here, the question
>> is: how can I access the CmsObject from a servlet other than the opencms
>> As far as I could see the CmsObject is generated in OpenCmsCore
>> but all methods are privates and I think I should not touch code in there.
>> I would thanks any help.
More information about the opencms-dev