[opencms-dev] Integration into (huge) legacy web-app
Christian Steinert
christian_steinert at web.de
Tue Dec 19 07:54:47 CET 2006
Anders Bengtsson schrieb:
> Hi,
>
> We're going to replace our old in-house CMS with something more
> maintainable. OpenCMS looks like a good candidate feature-wise, but I'm
> not sure about how we would deploy it.
>
> Our existing CMS serves lots of fragments of pages from JSP templates,
> similar to OpenCMS's JSP tags.
>
> How can I deploy OpenCMS to replace our existing CMS? I can't just drop
> in a new War file, I need it to run as part of our existing, very large,
> application. The documentation doesn't seem to go into what's needed to
> integrate OpenCMS into something existing.
> Is there a simple way to add a few Jars and some config files into my
> app, and start serving content using OpenCMS' JSP tags?
>
OpenCms has another wrapping level for Jsp processing that sits between
the servlet container and the JSPs that you deposit in opencms. This is
necessary to export JSP files from the database-based virtual filesystem
into the real filesystem before their execution, to do things like
caching, etc.
So I don't know how easily you could embed OpenCms output into a larger
JSP application. This might be a bit difficult, sadly I really have no
idea, how you would approach this. It should be possible to get an
instance of the main opencms Object if your other application runs in
the same virtual machine instance. But even with that, I don't know how
you could hook into the request handling mechanism.
It might be better to just keep your data in opencms, and to use your
main application to get the needed information from opencms and assemble
your pages. That would mean, though, that you could only use the Java
APIs of OpenCms and not the JSP layer.
If your content is not very dynamic, you could use the static export
feature of opencms which writes generated content into the file system
whenever changes are published. This exported content could be taken
from the filesystem and pieced together by another application.
Of course, you could also send HTTP requests to OpenCms from your other
application, but this is not very elegant.
Those are the things that come to my mind, I think it's difficult to
plug the JSP layer of OpenCms into a larger processing pipeline. I
understand your demand, but OpenCms is it's own servlet after all. If
you want to change that, then you would have to study the code and play
around with the request handler of OpenCms. Maybe you can wrap the whole
request handler of OpenCms and invoke it from your own application. It
might be well worth to take at least a glance at how the OpenCms Servlet
handles requests and how easily the relevant code could be called from
elsewhere.
hth a bit
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061219/84ba40fe/attachment.bin>
More information about the opencms-dev
mailing list