OpenCms 7 Development

OpenCms 7 Development
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 40%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Targets version 7 of OpenCms
  • Create new modules to extend OpenCms functionality
  • Learn to use the OpenCms templating system


Book Details

Language : English
Paperback : 292 pages [ 235mm x 191mm ]
Release Date : April 2008
ISBN : 1847191053
ISBN 13 : 9781847191052
Author(s) : Dan Liliedahl
Topics and Technologies : All Books, CMS and eCommerce, Content Management (CMS), Java, Open Source

Table of Contents

Chapter 1: Overview
Chapter 2: Developing in OpenCms
Chapter 3: Our First Module
Chapter 4: Developing Templates
Chapter 5: Adding Site Search
Chapter 6: Adding User Registration and Comment Support
Chapter 7: Providing Site Customization Features
Chapter 8: Extending OpenCms: Developing a Custom Widget
Chapter 9: Extending OpenCms: Adding RSS Feed Support
Chapter 10: Extending OpenCms: Adding an Administration Point
  • Chapter 1: Overview
    • The Site Design
    • Required Developer Skills
      • Basic Site Development
      • Sites Requiring Custom Content Types
      • Sites Requiring Custom Features
      • Bespoke Site Development
  • OpenCms Application Overview
    • The OpenCms Directory Structure
      • The Real File System Layout
      • The Virtual File System Layout
    • OpenCms Architecture
    • Extensibility through Modules
    • The OpenCms Web Request Process
    • OpenCms Web Application Packaging
    • Building a Complete Site with OpenCms
  • Summary
  • Chapter 2: Developing in OpenCms
    • Developing Basic Site Content
    • Setting Up an Environment for Creating JSP Code
      • Editing Files Using File Synchronization
      • Using WebDAV for Editing
      • Debugging JSP Code in OpenCms
  • Setting Up an Eclipse Environment to Build OpenCms
    • Tools Needed to Build OpenCms in Eclipse
    • Step 1: Checkout the Project Source from CVS
    • Step 2: Setting the Classpath for Compilation
    • Step 3: Using Ant to Build a Distribution Package
    • Building OpenCms outside of Eclipse Using Ant
    • Debugging OpenCms in Eclipse
  • Setting Up an Eclipse Environment without Building OpenCms
  • Summary
  • Creating a Module
    • Creating a BlogEntry Content Type
    • Registering the Content Type
      • Additional Schema Features
      • Field Mappings
      • Field Validations
      • Default Field Values
      • Localization
      • Content Relationships
      • Content Previewing
      • Creating Content Using a Model
      • User Interface Widgets
      • Nested Content Definitions
    • Editing Configuration Files with Validating Editors
    • Organizing the Content
  • Summary
  • Chapter 4: Developing Templates
    • Review of the Page Layout
    • Templates in OpenCms
      • Creating the Templates
      • The Homepage Template
      • The Blog Content Loop
      • The Sidebar and Footer
      • Common Code Elements
        • Header Code
        • Search Form
        • Advertisements
        • Blog Archives
        • RSS Client and RSS Feeds
        • Footer Section
      • The Supporting Java Bean Class
      • The Blog Template
    • The Content and Template Loading Process
    • Expressions in JSP Templates
      • Using the Tag Library from JSP
      • Combining Expressions with JSTL
    • Accelerating Template Development Using WebDAV
      • Install the Eclipse WebDAV Plug-in
      • Create a Site Within Eclipse for the Server
      • Import Content into the Project
    • Summary
  • Chapter 5: Adding Site Search
    • A Quick Overview of Lucene
      • Search Indexes
      • Search Queries
    • Configuring OpenCms Search
      • Field Configurations
      • Creating a Field Configuration
      • Creating an Index Source
      • Additional Search Settings
      • Introducing Luke – a Visual Index Tool
    • Writing the Search Code
      • A Simple Search Example
      • Subclassing the CmsSearch Bean
      • The Search.jsp Template
    • Summary
  • Chapter 6: Adding User Registration and Comment Support
    • Understanding OpenCms Security
      • User, Groups, Roles, and Permissions
      • Organizational Units
    • Setting up Security for Our Site
      • Organization Unit and Group Setup
      • Adding the Users
      • Resource Permissions
    • User Login and Registration Code
    • Adding Comment Support
      • Adding the Comments to the XML Content
      • Publishing the Comments
    • Summary
  • Chapter 7: Providing Site Customization Features
    • What is RSS?
    • Creating the Module
    • The RSS Client Code
    • Displaying the RSS Feed in the Template
    • Adding User Preferences to Accounts
    • Updating the Java Code
    • Updating the JSP Templates
    • Hooking up the Account Management Page
  • Summary
  • Summary
  • Summary
  • Summary

Dan Liliedahl

As eFoundry's Founder and Chief Technology Officer, Dan Liliedahl's early vision for the company has culminated in a professional services firm that provides its Fortune 1000 clients with focused expertise in the development and deployment of sophisticated Web infrastructures and content management applications. eFoundry is a system integrator that customizes and deploys OpenCms, which is quite mature with a large developer community. Dan serves as the firm's primary architect for the enterprise content management solutions that enable the delivery of e-business initiatives such as portals, web services, and online catalogs. Prior to his position at eFoundry, Dan served as principal engineer and architect for content management software pioneer FutureTense, Inc. While there, he designed and deployed state-of-the-art J2EE-based enterprise content management solutions for leading international companies in the financial services and publishing industries. Before FutureTense, Dan was principal software engineer for SBL scripting language firm, Mystic River Software. He has also managed the architecture, design and implementation of mission-critical software products for Massachusetts-based firms Adra Systems, Inc., Simplex Time Recorder, Intellution, and Butler Automatic. Dan has a Bachelors of Science in electrical engineering from the University of New Hampshire's College of Engineering and Physical Sciences.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 2 submitted: last submission 07 Mar 2013

Errata type: Typo | Page number: 112 | Errata date: 12 July 2008


getRequestContext().getUri()); // allow edit mode for offline previewing blog.editable(); t%>

There is a 't' in the last line of the second code-paragraph that doesn't belong there:

Delete 't'



// allow edit mode for offline previewing




Errata type: Typo | Page number: 20 | Errata date: 3 Apr 08

'The OpenCms Web Request Process' topic has example :- http://mydevserver:8080/opencms/opencms/system/logon/index.html. In this example word 'logon' should be actually 'login'.This typo error is repeated 3 times in the same topic


Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

OpenCms 7 Development +    Tcl 8.5 Network Programming =
50% Off
the second eBook
Price for both: $39.00

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • An overview of the OpenCms development architecture
  • Developing in the OpenCms environment
  • Working with the templating system
  • Using the template API
  • Extending and using OpenCms beans in template code
  • Using the JSTL tag library
  • Template caching
  • Understanding resource collectors
  • Understanding and creating OpenCms modules
  • Creating structured content types
  • Rules for creating OpenCms schema files
  • Registering content types with OpenCms
  • User Interface Widgets and their options
  • Nesting content types
  • Using Validating XML editors to edit configuration files
  • Using Eclipse and WebDAV for module development
  • Configuring OpenCms Search
  • Looking at search indexes
  • Supporting searching in templates
  • Understanding OpenCms security
  • Adding user registration and web user logins
  • Programmatic publishing of content
  • Providing site customization features
  • Designing and creating Custom OpenCms widgets
  • Using OpenCms message strings for localization
  • Adding RSS support to OpenCms
  • Adding OpenCms Administration Points
  • Using OpenCms List and Dialog classes
  • Programmatically using OpenCms widgets

In Detail

OpenCms is a professional-level open-source Website Content Management System, based on Java and XML. Many companies or organizations have requirements that go beyond what is available in the standard OpenCms application. Thankfully, OpenCms can be used by Java developers to create sophisticated add-ons and customizations that extend the power of OpenCms in virtually unlimited directions.

Targeting version 7 of OpenCms, this book is for Java developers interested in extending and further customizing OpenCms through its Java API.

Starting by showing how to set up a development environment for OpenCms work, the book moves you through various tasks of increasing complexity. Some of the common tasks covered are building OpenCms, XML asset type development, templating, module development, user and role setup, and search integration. In addition to these common tasks some more advanced topics are covered such as self-registering users, RSS support, developing custom widgets and extending the administrative interface. All the topics include examples and are presented while building a sample blog site.

The skills you develop will make you an OpenCms developer to be reckoned with!

Targeting version 7 of OpenCms, this book is for Java developers interested in extending and further customizing OpenCms through its Java API.


This book is a clear, practical tutorial to OpenCms development. It will take you through the development of an example site, illustrating the key concepts of OpenCms development with examples at every stage.

Who this book is for

The book is for Java developers with a basic knowledge of the operations of OpenCms. No previous experience of developing OpenCms is expected.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software