[opencms-dev] Access OpenCMS via API - URGENT // RE: [opencms -dev] Class CmsRequestHttpServlet

Peter.Trumpp at entory.com Peter.Trumpp at entory.com
Wed Mar 26 00:26:07 CET 2003


Hi Ralf,  Hi Laurent!

I was also looking for some more information about the core openCMS-API (=
accessing / creating content from "outside"),
especially the possibility to access the system from other programs - like Ralf
describes in his posting.

 My current results are:

a) If you have an instance of "CMSObject", everything is fine. You can access
all the functionality you need.

b) Only for JSP-Files that are part of the openCMS system (and
calling-sequence), it is easy to get such an instance (see "RE: [opencms-dev]
Class CmsRequestHttpServlet")

c) The only alternative way I detected so far to CREATE such an instance is the
approach that is used in "com.opencms.core.CMSShell.java". This is the main
class for the command line shell utility that can be started by calling the
cmsshell.bat / cmsshell.sh from your openCMS/WEB-INF directory.
Unfortunatly, this isn't really something you would use for Ralf's scenarios
"1)" and "2)", because this is not "connecting to the CMS-server" at all, but
setting up a new server, i.e. new DB-Connections + need for all JAR-Files + ....
(-> a "real" client from my point of view, should not need all the class-files
and should not directly connect to the main DB?!?)

But maybe (hopefully ;-) I'm wrong and there is still another way to get such an
instance of CMSObject. If you find one, please inform me!

Regards,
Peter



|-------+----------------->
|       |                 |
|       | ambiesense at gmx.d|
|       | e               |
|       |                 |
|       | 25.03.2003 18:49|
|       | Please respond  |
|       | to opencms-dev  |
|       |                 |
|-------+----------------->
  >---------------------------------------------------------------------------->
  |                                                                            |
  |     To:  opencms-dev at www.opencms.org                                       |
  |     cc:  (bcc: Peter Trumpp/ENTORY/GDB)^                                   |
  |     Subject:  RE: [opencms-dev] Access OpenCMS via API - URGENT            |
  >---------------------------------------------------------------------------->
  >--------------------|
  |                    |
  >--------------------|





Hi,

I wonder if I could implement one or more of the following examples:

1) I would like to have a java program runnung as a Servlet in Tomcat. Can
this servler use OpenCMS via its API to insert Data into OpenCMS ?

2) I have a Java Program outside of of Tomcat and OpenCMS but on the same
machine. Can this Java program access OpenCMS somehow (API?) to do this?

3) How can I run the program, mentioned before, inside of OpenCMS. Can I
trigger this program via OpenCMS (i.e. every time a certain web page get
accessed) ?

The documentation gives me only the impression I can run some code triggered
by content templates. This is not enought for me. I would like to develop
some some comprehensive logic which uses OpenCMS. Are there better CMS
solutions for this? Thank you for any feedback!

Cheers
Ralf


> Do you mean creating new files automatically within the opencms? If that
> is
> what you mean you probably can adapt the functionality from
> com.opencms.workplace.CmsNewResourcePage class.
>
> Regards,
>
> Olli
>
> > -----Original Message-----
> > From: owner-opencms-dev at www.opencms.org
> > [mailto:owner-opencms-dev at www.opencms.org]On Behalf Of ambiesense at gmx.de
> > Sent: 25 March 2003 11:34
> > To: opencms-dev at www.opencms.org
> > Subject: [opencms-dev] Access OpenCMS via API - URGENT
> >
> >
> > Hi,
> >
> > I would like to write a program which allows me to insert data
> > into OpenCMS.
> > I think the OpenCMS API should allow me this. How does it works? Can
> > somebody provide me with a example source code or point me to a
> > webpage handling
> > with this topic?
> >
> > If OpenCMS is not good in this area ... Is there another open source (or
> a
> > product with a similar licence flexility) which can do this better?
> >
> > Cheers
> > Ralf





More information about the opencms-dev mailing list