[opencms-dev] Retrieving content from OpenCms to external web app

Walker, Brendan Brendan.Walker at sensis.com.au
Fri Sep 2 02:32:25 CEST 2005


G'day Miikka,

Thanks so much for taking the time to respond. Looks like we're both
going down the same track. I was thinking that I was going to have to
use the JSTL "import" tag to grab content from the OpenCms site, which I
think would have a performance impact on my site.

I'm currently investigating the CmsShell class that comes with version
6.0.0. This class is used to link into the OpenCms repository from a
command line interface. I'm assuming I'll be able to set up something
similar to then link into the repository from my Struts Action and then
hopefully still be able to use the OpenCms tags from a completely
separate server to that used by the base install.

I.e. This sort of approach:

1. Install OpenCms on Tomcat on Machine A.
2. Take the config property files and JARs from the WEB-INF directory on
Machine A and add to my application server on Machine B.
3. Use my customised "OpenCmsRepositoryLoader" class along with the
files from point 2 to get an OpenCms instance and therefore be able to
create a CmsObject and therefore be able to access any content.
4. I'm then guessing/hoping that I'll be able to use the provided
OpenCms taglib to access content. (I'm expected that they'd need some
tweaking, but this isn't an issue for me as I'll most likely create an
'interface' taglib that is based on the JSR-170 specification.)
5. We then have a solution whereby out original JSPs can 'suck' content
from OpenCms as opposed to having to convert all our JSPs to OpenCms.

The other thing I'm yet to determine though, is whether or not this is
actually worth all the effort, in that, if all I'm doing is using
OpenCms as a datastore, then why not just use a normal database and
define admin screens myself. I guess it's that last point that is the
key. I'm hoping that I'll still be able to use the OpenCms admin tool as
an effective administration tool for my content. I'm, also hoping that
the tags can somehow support both online and offline support so that I
can still preview the content using my application server.

Does all that make sense?

Cheers again for your input.

Regards,
Brendan

-----Original Message-----
From: Oksanen, Miikka [mailto:Miikka.Oksanen at satama.com]
Sent: Thursday, 1 September 2005 9:20 PM
To: Walker, Brendan
Subject: RE: [opencms-dev] Retrieving content from OpenCms to external
web app

Hi Brendan,

the workaround we implemented for this was in the end pretty simple. We
created a JSP to OpenCms to take page name (file name) as a parameter
and to
return the content of the related page. Then we just utilized some
JSTL-tags
(c_rt:include) and this way we got the content from OpenCms to the
external
web apps. It's basically like including JSPs into another JSPs.

This certainly is not the most beautiful approach, but it seems to work
ok
and is sufficient at this stage.
In further development we will most likely implement the some kind of
interface on OpenCms, which would then handle the content flow from
OpenCms
to SessionFacade and from there to Business Delegate, Struts Action and
to
the JSP.

Hope this helps you, please don't hesitate to ask if this feels unclear
or
inaccurate.

Kindest regards,
Miikka Oksanen



-----Original Message-----
From: Walker, Brendan [mailto:Brendan.Walker at sensis.com.au]
Sent: 29. elokuuta 2005 12:56
To: Miikka.Oksanen at satama.com
Subject: Re: [opencms-dev] Retrieving content from OpenCms to external
web
app


G'day Miikka,

I noticed your post on the OpenCms newsgroup and it seems like I have
the
same issue as yourself. I didn't notice any replies. Did you solve this
issue? Were you able to get OpenCms to work as you specified or did you
opt
for another solution.

Any help would be greatly appreciated.

Regards,
Brendan Walker


>Hi,
>
>I'm evaluating OpenCms for my customer and planning to use it so that
I'd
>retrieve content from OpenCms web app to external web application.
>We've been using Struts and Tiles in development of the web app in
question
>and there's some much UI logic involved that it would be too risky just
to
>mount them on OpenCms.
>
>Instead, I'd like to replace the static content in the JSPs with the
tags,
>which would get the content from OpenCms. The JSPs would be located in
>external web app and the content itself in some form in OpenCms. And
there
>might be a SessionFacade talking to OpenCms web app to return some
certain
>content (for example "release notes") and that would then be handed to
the
>other web app to be shown on the page through Business Facade, Struts
Action
>and finally the related JSP.
>
>Is there any best practice to connect from external web app to OpenCms
to
>accomplish the defined task?
>
>Best regards,
>Miikka Oksanen



www.about.sensis.com.au
A leading Australian advertising, information and directories business.
www.sensis.com.au
www.yellowpages.com.au
www.whitepages.com.au
www.citysearch.com.au
www.whereis.com.au
www.telstra.com.au
www.tradingpost.com.au
www.universalpublishers.com.au
www.invizage.com.au
This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged.
Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email.
If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 8653 5000]



More information about the opencms-dev mailing list