You are previewing Building Websites with OpenCms.
O'Reilly logo
Building Websites with OpenCms

Book Description

A practical guide to understanding and working with this proven Java/JSP-based content management system

  • Understand how OpenCms handles and publishes content to the Web

  • Learn how to create your own, complex, OpenCms website

  • Develop the skills to implement, customize, and maintain an OpenCms website

  • In Detail 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. What you will learn from this book? With this book you will master OpenCms, and learn the skills to implement, customize, and maintain an OpenCms website. This book covers:
  • Installing OpenCms, and its basic concepts

  • Using the OpenCms Workplace

  • Exploring the core architecture and the virtual file system

  • Working with JSP templates

  • Creating OpenCms modules

  • Adding custom resource types

  • Exporting to static HTML

  • Deploying and managing an OpenCms website

  • At the end of this book, you will:
  • Understand how OpenCms handles and publishes content to the Web

  • Be confident working in the OpenCms environment

  • Have the skills to extend the OpenCms system

  • Be able to create your own, complex, OpenCms website

  • Who this book is written for? If you are a web developer new to OpenCms, or are an experienced OpenCms developer who is looking to get the most from the system, then this is the book for you. A working knowledge of Java, JSP, and XML is required to get the most from OpenCms, and from this book.

    Table of Contents

    1. Copyright
    2. Credits
    3. About the Author
    4. Introduction
      1. What This Book Covers
      2. What You Need for Using This Book
      3. Conventions
      4. Reader Feedback
      5. Customer Support
        1. Downloading the Example Code for the Book
        2. Errata
        3. Questions
    5. 1. Introduction to OpenCms
      1. What Is a Content Management System?
        1. Three Essential Components
      2. What Is OpenCms?
        1. Features
        2. History
        3. The OpenCms Community
      3. The Purpose of This Book
      4. Technical Overview
        1. The Web Server and Java Servlets
        2. The Database
        3. Pages, Templates, and Java Server Pages
        4. Bringing it Together
      5. Summary
    6. 2. Installing OpenCms
      1. Prerequisites
        1. Configuring the MySQL Database
          1. MySQL on Linux
          2. MySQL on Windows
          3. Finishing the MySQL Setup
        2. Configuring the Tomcat Servlet Engine
          1. Linux Configuration
          2. Windows Configuration
        3. Configuring Encoding
        4. Tuning the JVM
      2. Installing the OpenCms WAR File
        1. Configuring OpenCms to Use UTF-8
        2. Running the Install Wizard
          1. Advanced Setup Screens
        3. Basic Setup Screens
        4. Manually Configuring Settings
      3. Configuring the Client
        1. Mozilla-Based Browsers
        2. Internet Explorer
      4. Installation Troubleshooting
        1. Character-Set Issues
        2. Temp File Project ID Error
        3. Restarting Tomcat versus Reloading OpenCms
        4. Importing Workplace Screen Freezes
        5. MySQL User/Password Changes
        6. Finding More Installation Help
      5. Summary
    7. 3. The OpenCms Workplace
      1. A Tour of the OpenCms Workplace
        1. The Toolbar
      2. The Explorer View
      3. Creating and Editing Content
        1. Creating a Folder
        2. The WYSIWYG Editor
        3. The Sourcecode Editor
      4. Publishing Your Changes
        1. Versioning
      5. Administration
        1. Project Management
        2. User Management
        3. Database Management
        4. Static Export
        5. Clear Element Cache
        6. Resource Type Management
        7. Properties Management
        8. Gallery Management Tools
        9. Link Checking
        10. Module Management
        11. Synchronization Management
        12. Scheduled Tasks
        13. Log File Viewer
        14. Channels
        15. Flex Cache Administration
      6. Workflow
        1. Creating and Managing Tasks
        2. Workflow Management Strategies
          1. Use Projects to Manage Content Areas
          2. Use Group Hierarchies for Inherited Permissions
          3. Track Work with Tasks
          4. Keeping a Trail
      7. Modules
        1. Obtaining Official OpenCms Modules
        2. The Help System Modules
        3. Importing OpenCms Modules
          1. Where Did All that Module Data Go?
        4. Online Documentation Modules
        5. Other Modules
      8. Summary
    8. 4. Customizing the Site
      1. Overview of Creating a Site
      2. Working with Templates and Tags
        1. Creating a Site Module for Templates
        2. Creating a New Template
          1. The JSP Template
          2. Associating a Page with the New Template
      3. JSP Tag Libraries and Scriptlets
        1. JSP Tag Libraries
        2. The OpenCms Tag Library
          1. The JSP Template
          2. Creating a JSP Document
        3. JSP Scriptlets
          1. Basic Scriptlets
          2. The CmsJspActionElement Object
          3. OpenCms Navigation
          4. Getting the Contents of Other Files
          5. Advanced Scriptlet Programming
        4. A Few Things to Watch Out For
          1. The File System
          2. Redirecting and Forwarding
          3. Java Synchronization
          4. Dynamic Content and Publishing
          5. Structuring Code and Content
      4. The FlexCache
        1. Tuning the FlexCache
        2. FlexCache JSP Directives
          1. Absolute Directives
          2. User Directives
          3. Time-Sensitive Directives
          4. URL Directives
        3. Controlling the Cache with URL Parameters
        4. Using FlexCache
      5. Internationalization
        1. Modules
          1. Creating ResourceBundles
          2. JSPs and ResourceBundles
      6. Summary
    9. 5. The OpenCms System Architecture
      1. Resource Types
        1. Coding a New Resource Type
          1. Building the Resource Type
          2. Building with Ant
          3. Editing the Properties Files
        2. Adding a Restype
          1. Menu Items
          2. Rule Keys
          3. Adding Properties for the Resource Type
          4. Editing the OpenCms Registry
        3. Using the New Resource Type
      2. Content Definitions
        1. The Steps for Creating a Content Definition
          1. Important Methods
      3. The Virtual File System
        1. How Page Types Are Stored in the VFS
        2. Resource Names and the VFS
        3. Reading from and Writing to the VFS
      4. Class Structure
        1. com.opencms.boot
        2. com.opencms.core
        3. com.opencms.dbpool
        4. com.opencms.defaults
        5. com.opencms.defaults.master
        6. com.opencms.file
        7. com.opencms.file.<database>
        8. com.opencms.file.utils
        9. com.opencms.flex
        10. com.opencms.flex.cache
        11. com.opencms.flex.jsp
        12. com.opencms.flex.util
        13. com.opencms.htmlconverter
        14. com.opencms.launcher
        15. com.opencms.linkmanagement
        16. com.opencms.report
        17. com.opencms.template
        18. com.opencms.template.cache
        19. com.opencms.util
        20. com.opencms.workplace
      5. Summary
    10. 6. Creating an OpenCms Module
      1. Using Modules
        1. The Site Module
      2. Creating a Module
        1. Navigating the New Module
      3. Custom Classes and Libraries
        1. Adding Libraries
      4. Adding Content
        1. Creating a Simple XML Document
        2. A Place for XSLT Templates
        3. JSP Elements
      5. Adding a Scheduled Task
        1. The BatchTransformer Class
        2. The CronBatchTransformer Class
        3. Scheduling a Task
          1. How an I_CmsCronJob Is Executed
      6. Managing the Module
        1. Administrate
          1. The Dependency Screen
          2. The Module Properties Screen
        2. Properties
        3. Accessing Module Parameters from JSP Pages
      7. Exporting and Deploying the Module
      8. Summary
    11. 7. Advanced Modules
      1. Adding an Administration Point
        1. Creating Icons
        2. Adding a Properties File
        3. Creating Administration Point Folders
          1. Adding Additional Properties
      2. Creating an Administration JSP
        1. The JSP Code
        2. The Administration Point in Action
      3. XML Templates
        1. How XML Templates Work
        2. Editing XML Templates
        3. The Structure of the Workplace XML Templates
          1. The action Folder
          2. The administration Folder
          3. The help and locales Folders
          4. The resources Folder
          5. The restypes Folder
          6. The scripts Folder
          7. The templates Folder
          8. The /system/login Folder
      4. Creating a Custom Launcher
        1. The Basic Idea
        2. Implementing a Launcher
        3. Editing the Registry
        4. Testing the Launcher
        5. Other Considerations
          1. Creating XML-Template-Based Launchers
          2. Creating Resource Loaders
      5. Master Modules
      6. Summary
    12. 8. Deploying an OpenCms Solution
      1. Serving Static versus Dynamic Content
        1. Published Resources
        2. Static Serving
        3. Dynamic Serving
        4. The Export Property
          1. Changing Export Settings
      2. Static Export
        1. Configuring for Static Export
          1. Export Path Settings
          2. Export URL Settings
          3. Using Relative Links
        2. Running a Static Export
        3. Touching All Files in the VFS
      3. Web User Authentication and Management
        1. How OpenCms Handles Authentication
          1. The Guest User
          2. CMS Users
        2. Web Users
        3. Creating Web Users
          1. The create_webuser.jsp Scriptlet
        4. Authenticating Web Users
          1. Using the Authentication JSP
          2. Restricting Access through a Template
      4. Backup and Recovery
        1. Backing Up the Database
        2. Backups from Within OpenCms
          1. Performing an OpenCms Database Export
          2. Backing Up Large Sites
          3. The Backup Files
        3. Importing an Export Zip File
          1. Users and Groups
          2. Resources
      5. Performance Tuning
        1. Database Tuning
          1. MySQL
          2. Oracle
          3. SQL Server
        2. OpenCms Tuning
          1. FlexCache
          2. Page Streaming
          3. Efficient Coding
      6. Other Resources
      7. Summary
    13. A. Building OpenCms from Source
      1. What You Will Need
      2. Getting the OpenCms Source
      3. Checking Out the Source from CVS
      4. Building OpenCms with Ant
      5. Generating Javadocs
      6. Summary
    14. B. Using the OpenCms Lucene Search Module
      1. Searching Technologies and OpenCms
      2. About the OpenCms Lucene Module
      3. Obtaining and Installing the Module
        1. Configuring the Registry
          1. Global Parameters
          2. Document Factories
          3. Content Definitions
          4. Directories
          5. Finishing the Registry
        2. Running the Index Manager
      4. Searching with Lucene
      5. Hacking the OpenCms Lucene Module
      6. Summary