[opencms-dev] access OpenCms from outside tomcat

miquel at aguado.de miquel at aguado.de
Thu Aug 4 14:22:53 CEST 2005


Hello,

Can somebody help on how to start and access OpenCms from outside its
tomcat context to acces the vfs (e.g. create resources as import from
another cms-system)?
What I need is something like the following from a "normal" java
application:

CmsJspActionElement cmsJspActionElement = new
CmsJspActionElement(pageContext, request, response);
CmsObject cmsObject = cmsJspActionElement.getCmsObject();
// ...
CmsResource cmsResource = cmsObject.createResource(resourceName, type,
content, properties);
cmsObject.unlockResource(resourceName);
cmsObject.publishResource(resourceName);

The examples tell about OpenCms.initCmsObject(...) etc.
But
1. how to tell OpenCms where db-connection, xml-conf files etc. are
located
2. how to get an cmsObject from it

Thanks in advance,
Miquel



More information about the opencms-dev mailing list