Book Image

Building Websites with OpenCms

Book Image

Building Websites with OpenCms

Overview of this book

This book takes you through the process of creating content-rich websites and applications using OpenCms. Although powerful and flexible, OpenCms can be daunting on first approach, but its advanced features reward the investment in learning. This book exists to ease Java developers into getting the most from OpenCms. OpenCms OpenCms is a professional-level, open source Website Content Management System, with which you can create and manage complex websites. Based on Java and XML technology, it fits into almost any modern IT environment. With hard-won experience of the practical difficulties faced by developers working with OpenCms, this book is the embodiment of the author's expertise, and the perfect way to master the system.
Table of Contents (12 chapters)
Building Websites with OpenCms
Credits
About the Author
Introduction

Custom Classes and Libraries


Java classes and libraries can be used to add sophisticated functionality to a module. There are no specific caveats or constraints on classes and libraries—as long as they do not overtly conflict with existing code (for example, importing a different version of an existing library, such as Xerces), any code can be included in a module.

OpenCms does not offer any tools for developing the Java code inside the CMS. Unlike JSP files, Java code must be written and compiled outside OpenCms, and then the resulting .class or .jar files must be imported. Any time this executable content is added or modified, you must unlock and publish the files so that the code will be copied from the VFS to the real file system, where the Java classloader can find it. Then, you will need to restart the servlet container so that the classes will be loaded.

Our module will contain the code necessary for applying an XSLT stylesheet to an XML document, transforming it into an HTML document...