Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Building Websites with OpenCms
  • Table Of Contents Toc
Building Websites with OpenCms

Building Websites with OpenCms

2 (1)
close
close
Building Websites with OpenCms

Building Websites with OpenCms

2 (1)

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)
close
close
Building Websites with OpenCms
Credits
About the Author
Introduction

Adding a Scheduled Task


OpenCms provides a mechanism, similar to cron in UNIX, for running particular tasks at an appointed time. The primary user interface to this tool is in the 'scheduled tasks' section of the administration view. In this section, we will create a new task to convert batches of XML to HTML using the CmsXslTransformer class we created earlier.

To accomplish our task, we will need to create two classes—one to do the batch transforming and one to implement the com.opencms.core.I_CmsCronJob interface. Technically, these could be merged into one class, but since we may want to reuse the batch transformation code elsewhere, it is good to keep functionality split.

The BatchTransformer Class

The first class, BatchTransformer, will be responsible for transforming a directory of files using a single stylesheet, and then writing the resulting files to another directory.

package com.example.genericxml.xslt;
import com.opencms.core.CmsException;
import com.opencms.core.A_OpenCms;
import...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Building Websites with OpenCms
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon