[opencms-dev] Invoking openCMS from Java, not within a servle t/Tomcat

O'Reilly John John.OReilly at traventec.com
Wed Nov 19 10:48:01 CET 2003


Hi,

I have also been attempting to use OpenCms from within a separate vm.  Using
CmsShell as a basis I've got as far as retrieving content description using
the following code:

CmsBase.setBasePath("C:\\devtools\\Tomcat
4.1\\webapps\\opencms\\WEB-INF\\");
String propsPath = CmsBase.getPropertiesPath(true);
Configurations conf = new Configurations(new ExtendedProperties(propsPath));
OpenCms opencms = new OpenCms(conf);

CmsObject cms = new CmsObject();
opencms.initUser(cms, null, null, "Admin", "Administrators", 1, null); 

String target = "/testapp/index.html";
CmsFile file = cms.readFile(target);
String contents = new String(file.getContents());
System.out.println(contents);


I've been trying to get the opencms engine to generate html (content
combined with templates) but have been unsuccessful so far.  Any ideas
warmly welcomed.

rgds,
John

 
-----Original Message-----
From: Soft Wearable [mailto:softwearable at hotmail.com]
Sent: 18 November 2003 17:45
To: opencms-dev at opencms.org
Subject: [opencms-dev] Invoking openCMS from Java, not within a
servlet/Tomcat


Hi,

I tried to write a program which instantiates opencms without tomcat 
running, like th CmsShell. However, I got exception in the middle of the 
instantiation something like "....unable to intiate registry..." kinda. I 
think I'm missing something. It should be possible to get openCMS working 
without tomcat right? Have any clues about what to bear in mind?

Murat
Thanks

_________________________________________________________________
Send a QuickGreet with MSN Messenger 
http://www.msnmessenger-download.com/tracking/cdp_games

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
************************************************************************
This e-mail and any files transmitted with it are confidential and may be
privileged and are intended solely for the individual named/ for the use of
the individual or entity to whom they are addressed.If you are not the
intended addressee, you should not disseminate, distribute or copy this
e-mail.Please notify the sender immediately if you have received this e-mail
by mistake and delete this e-mail from your system.If you are not the
intended recipient, you are notified that reviewing, disclosing, copying,
distributing or taking any action in reliance on the contents of this e-mail
is strictly prohibited.Please note that any views or opinions expressed in
this e-mail are solely those of the author and do not necessarily represent
those of Traventec Limited.E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, or arrive late or incomplete.Traventec Limited therefore does not
accept liability for any errors or omissions in the contents of this
message, which arise as a result of e-mail transmission.The recipient should
check this e-mail and any attachments for the presence of viruses.This
e-mail has been swept for computer viruses however Traventec Limited accepts
no liability for any damage caused by any virus transmitted by this e-mail.



More information about the opencms-dev mailing list