Chapter 5. CMS Portlet

5.1. Introduction

The CMS Portlet displays content from the file store inside a portlet window, or, in the case of binary content, outside of the portlet window altogether.

Note

All of your content resides under JBOSS_HOME/server/standard/data/portal/, if an administrator used the default filesystem store settings JBoss Portal ships with. You should not modify any of the directories/files under there, as it may cause the CMS portlet to not function properly.

5.2. Functionalities

As of JBoss Portal Beta 1, the CMSPortlet handles all requests for all content types.

The methodology of serving content within the CMSPortlet, allows for some beneficial features, like:

  1. Search-engine friendly URLs: http://domain/[portal]/company.html
  2. No need to modify existing web page links. links to resources (images, web pages, pdfs, zips) can all be maintained as relative.
  3. Serve binaries with simple urls independant of the portal: http://domain/products.pdf

5.3. Portlet Configuration

JBoss Portal uses Jakarta Slide as its WebDAV repository. This allows most web and file browsers to navigate to a shared repository and, given the proper rights, allows for modification of content.

Here is the default configuration for the CMS respository found under portal-core.war/WEB-INF/web.xml:

<?xml version="1.0"?>
         <!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">
         <web-app>
         <context-param>
         <param-name>URL</param-name>
         <param-value>http://localhost:8080/webdav/files</param-value>
         <!-- Comment out for SSL communication between Portal and Webdav -->
         <!-- <param-value>http://localhost:443/webdav/files</param-value> -->
         <description>WebDAV server URL</description>
         </context-param>
         <context-param>
         <param-name>rootdir</param-name>
         <param-value>/files</param-value>
         <description>WebDAV Directory Root</description>
         </context-param>
         </web-app>
  1. URL: This is the absolute URL for the webdav store. Comment out the appropriate param-value for SSL communication between the portal and webdav layer.

  2. rootdir: specifies the base root directory for the WebDAV store. Under normal circumstances this should not be changed.

5.3.1. RDBMS Configuration

One additional item that is worth noting is that the slide store can be configured to access from a RDBMS using the Portal DataSource instead of the default filesystem store, by modifying portal-cms.sar/META-INF/jboss-service.xml.

<!-- The slide configuration using the database. Uncomment this and comment the above tx store for Database usage. -->
            <!--
            <definition>
            <store name="j2ee">
            <nodestore classname="org.apache.slide.store.impl.rdbms.J2EEStore">
            <parameter name="datasource">@portal.datasource.name@</parameter>
            <parameter name="adapter">org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter</parameter>
            <parameter name="compress">false</parameter>
            </nodestore>
            <securitystore>
            <reference store="nodestore"/>
            </securitystore>
            <lockstore>
            <reference store="nodestore"/>
            </lockstore>
            <revisiondescriptorsstore>
            <reference store="nodestore"/>
            </revisiondescriptorsstore>
            <revisiondescriptorstore>
            <reference store="nodestore"/>
            </revisiondescriptorstore>
            <contentstore>
            <reference store="nodestore"/>
            </contentstore>
            </store>
            <scope match="/" store="j2ee"/>
            </definition>
-->

To activate the DB store, uncomment the above configuration and comment the below information:

<!-- The slide configuration using the file system. -->
            <definition>
...
            </definition>

To create the proper DB tables, you will need to execute one the schema files found in this archive