Opencms Documentation Version 5.0
Total Page:16
File Type:pdf, Size:1020Kb
OpenCms Documentation Version 5.0 This document contains introductory material about OpenCms. The full 5.0 documenta- tion is only available in the form of OpenCms content modules. Please see chapter 1 to learn how to obtain and install these modules. www.opencms.org www.opencms.org May 5, 2003 Contents I. Introduction to OpenCms 1 1. About this documentation 3 1.1. Version of this document ............................ 3 1.2. The documentation structure of OpenCms 5.0 ................ 3 1.3. Where to get the documentation modules ................... 4 1.3.1. OpenCms documentation base ..................... 4 1.3.2. OpenCms JSP basic documentation .................. 4 1.3.3. OpenCms JSP taglib documentation ................. 4 1.3.4. OpenCms JSP scriptlet documentation ................ 4 1.3.5. OpenCms Flexcache documentation .................. 5 1.3.6. OpenCms module documentation ................... 5 1.3.7. Flex examples set 1 ........................... 5 1.3.8. Flex examples set 2 ........................... 5 1.3.9. Flex examples set 3 ........................... 6 1.3.10. Original JSTL 1.0 standard taglib examples ............. 6 1.3.11. Original Tomcat 4.x JSP examples .................. 6 1.3.12. Howto: JSP template development .................. 6 1.3.13. Howto: Translating the OpenCms workplace ............. 7 2. Installation of OpenCms 5.0 9 2.1. Install the Java JDK .............................. 9 2.2. Install Tomcat .................................. 9 2.3. Install MySQL ................................. 10 2.4. Deploy the opencms.war file .......................... 10 2.5. Install OpenCms using the Setup-Wizard ................... 11 2.6. Now your system is ready ........................... 11 2.7. Security issues .................................. 11 3. Client Setup 13 3.1. Configuring MS Internet Explorer 5.5 and 6.x Clients ............ 13 3.2. Configuring Netscape Navigator 7.x Clients .................. 14 i Contents 4. The OpenCms module mechanism 15 4.1. Introduction to OpenCms modules ...................... 15 4.2. How to import a module into OpenCms ................... 15 4.2.1. Restarting the OpenCms server after module import ........ 17 4.3. How to create, administrate, replace and export a module .......... 17 5. OpenCms User Manual 19 5.1. Introduction ................................... 19 5.1.1. What is OpenCms? ........................... 19 5.1.2. The advantages of OpenCms ...................... 19 5.1.3. Configuring the client .......................... 19 5.2. Section 1: OpenCms - The demo ....................... 21 5.2.1. Editing a website ............................ 21 5.2.2. Creating a new page .......................... 28 5.3. Section 2: OpenCms - The mechanics ..................... 32 5.3.1. The user interface ............................ 32 5.3.2. View Modes ............................... 32 5.3.3. Working on a project .......................... 33 5.3.4. Access permissions ........................... 38 5.3.5. The editor ................................ 40 5.3.6. Workflow ................................ 40 6. Components used by OpenCms 43 6.1. Operating System ................................ 43 6.2. Webserver .................................... 43 6.3. Servlet runtime engine ............................. 43 6.4. Java VM ..................................... 44 6.5. Database ..................................... 44 6.6. XML Parser ................................... 44 6.7. Mail API .................................... 44 6.8. FESI (a Free EcmaScript Interpreter) ..................... 44 6.9. JTidy ...................................... 45 6.10. Jakarta-ORO .................................. 45 7. Useful resources 47 7.1. OpenCms online resources ........................... 47 7.2. How you can help ................................ 47 7.3. How to subscribe to the opencms-dev mailing list .............. 48 II. Archived documentation 49 ii www.opencms.org Contents 8. About the archived documentation 51 8.1. Introduction to the archived chapters ..................... 51 8.2. How you can help ................................ 51 9. Enterprise JavaBean Integration 53 9.1. Advantages of OpenCms & EJB ........................ 53 9.2. EJB basics .................................... 54 9.3. Calling an EJB ................................. 55 9.4. Refinements ................................... 56 9.4.1. Configuration .............................. 56 9.4.2. Error handling ............................. 57 10.The Idea of Content Definitions 59 10.1. Writing a simple Content Definition ...................... 60 10.2. Adding access control to a Content Definition ................ 62 10.3. Content Definition enhancements ....................... 64 11.Backoffice Modules 71 11.1. Workplace Classes in general .......................... 71 11.2. Abstract Backoffice class ............................ 73 11.3. Changes to the Abstract Backoffice class since OpenCms 4.4 ........ 76 11.3.1. Changes to the getContent... methods ................ 77 11.3.2. Additional method getSetupUrl .................... 78 11.3.3. Filling the template from the CD automatically ........... 78 11.3.4. Filling the CD from the template’s fields automatically ....... 78 11.3.5. Testing for errors ............................ 79 12.The Mastermodule 81 13.Static Export 89 13.1. Introduction ................................... 89 13.2. Setting up Static Export ............................ 89 13.3. How to use static export ............................ 90 13.4. What have I to do? ............................... 90 13.5. How does static export work? ......................... 91 13.6. How to control what is exported? ....................... 91 13.7. How to export resources with parameters? .................. 92 13.8. Advanced properties of the static export: switch standard to dynamic ... 93 13.9. Advanced properties of the static export: Configure Https ......... 93 13.10.Advanced properties of the static export: Relative Links in Export ..... 94 13.11.Advanced properties of the static export: The Rulesets ........... 94 www.opencms.org iii Contents 14.The OpenCms synchronization 97 14.1. What is synchronization? ............................ 97 14.2. Manage the properties for OpenCms synchronization ............ 97 14.3. How to synchronize ............................... 98 14.4. How the files are synchronized ......................... 99 15.System architecture 101 15.1. Components ................................... 101 15.2. Accessing system resources ........................... 102 15.3. Resources .................................... 105 15.4. The Virtual File System (VFS) of OpenCms ................. 106 15.5. Class structure ................................. 106 16.Core Development 109 16.1. Introduction ................................... 109 16.2. How to compile the OpenCms core ...................... 109 16.2.1. Before you start ............................. 109 16.2.2. Have Ant installed ........................... 110 16.2.3. Get the OpenCms Source distribution ................ 110 16.2.4. Get additional classes (optional) .................... 110 16.2.5. Build the source by starting Ant .................... 111 16.2.6. Install your new version ........................ 111 16.2.7. Other Ant targets ............................ 111 16.2.8. Important ................................ 112 16.3. The Projectmechanism ............................. 113 16.3.1. Data structure ............................. 113 16.3.2. During installation of OpenCms .................... 114 16.3.3. Creating a new project ......................... 114 16.3.4. The view of the project ......................... 116 16.3.5. Publish a project ............................ 116 17.The proprietary XML template mechanism 117 17.1. Introduction to the XML template mechanism ................ 118 17.1.1. The master- frame- and contenttemplate ............... 118 17.1.2. Using methods in XML templates ................... 122 17.1.3. The body element ............................ 123 17.1.4. Defining the layout in the frametemplate ............... 126 17.2. XML templates and directories ........................ 128 17.2.1. The XML structure of a template ................... 128 17.2.2. Directory structure ........................... 129 17.2.3. The subdirectories of the content folder ................ 129 17.3. Details of the proprietary XML template mechanism ............ 131 iv www.opencms.org Contents 17.3.1. Using data blocks ............................ 131 17.3.2. Setting data blocks dynamically .................... 132 17.3.3. Using user-defined methods ...................... 134 17.3.4. The relationship between templates, page-control files, and Java classes .................................. 135 17.3.5. Process, Method and Element Tags .................. 136 17.3.6. Stylesheets ................................ 150 17.3.7. Javascript Blocks ............................ 150 17.3.8. Methods of the proprietary XML template mechanism ....... 152 17.3.9. Using the element cache for XML templates ............. 155 18.Building applications with XML templates 163 18.1. Building a navigation .............................. 163 18.2. Navigations with XML Templates ....................... 163 18.3. Frames ...................................... 174 18.3.1. Frames with XML templates ...................... 174 18.3.2. Frames- and noframes versions of a website with XML templates .. 177 18.4. The CmsObject Class (accessing system resources) ............. 179 18.4.1. Accessing user data ..........................