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
About the Author

Chapter 6. Creating an OpenCms Module

Modules provide a mechanism for extending the functionality of OpenCms with Java libraries and classes, JSP pages, and XML templates. Modules are designed to be easily distributed among OpenCms installations, and can provide functional elements ranging from portable content to sophisticated applications that interact with content in OpenCms. We have already encountered OpenCms modules. In this chapter, we are going to take an in-depth look at developing modules. Specifically, we will cover:

  • Using modules

  • Creating a module

  • Adding templates, content, and JSP pages to the module

  • Adding custom Java classes and libraries

  • Scheduling tasks to run automatically

  • Managing module dependencies

  • Exporting and deploying your module

Using Modules

The purpose of a module is to provide a container, easily imported and exported, to hold extensions to OpenCms. The temptation is to consider these 'extensions' to be complex applications including dozens of files of Java code, XML...