JBoss Portal packages a Web Content Management System capable of serving and allowing administration of web content. This chapter describes the CMS Portlet which is responsible for serving resources requested, the following chapter describes the CMSAdmin Portlet and all administration functionality.
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.
The CMSPortlet handles all requests for all content types.
The methodology of serving content within the CMSPortlet, allows for some beneficial features, like:
The CMS Portlet allows an administrator to configure the initial start page displayed via its deployment descriptor, located in jboss-portal.sar/portal-core.war/WEB-INF/portlet.xml
<init-param> <description>Default path to index page.</description> <name>indexpage</name> <value>/default/index.html</value> </init-param>
JBoss Portal uses Apache Jackrabbit as its Java Content Repository implementation. Configuration of the service descriptor, allows for changing many of the variables associated with the service.
Here is the default configuration for the CMS repository found under portal-cms.sar/META-INF-INF/jboss-service.xml :
... <attribute name="DoChecking">true</attribute> <attribute name="DefaultContentLocation">portal/cms/conf/default-content/default/</attribute> <attribute name="DefaultLocale">en</attribute> <attribute name="RepositoryName">repotest</attribute> <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
Below is a list of items found in the service descriptor and their definitions. Only items commonly changed are covered here and it is recommended you do not change any others unless you are very brave.
Also note that there is an additional parameter that decides under which path the portal should serve requests for content, located in the same jboss-service.xml:
... <mbean code="org.jboss.portal.core.cms.CMSObjectCommandMapper" name="portal:mapper=CMSObject" xmbean-dd="org/jboss/portal/core/cms/CMSObjectCommandMapper.xml"> <attribute name="Prefix">content</attribute> <attribute name="TargetWindowRef">default.default.DefaultCMSPortletWindow</attribute> <depends optional-attribute-name="Mapper" proxy-type="attribute">portal:mapper=PrefixDelegating</depends> <depends optional-attribute-name="CMSService" proxy-type="attribute">portal:service=CMS</depends> </mbean> ...
The CMS Portlet now serves content based on the user's locale setting. For example: if a user's locale is set to Spanish in his browser, and he requests URL: default/index.html , the CMSPortlet will first try and retrieve the Spanish version of that file. If a Spanish version is not found, it will then try and retrieve the default language version set for the CMSPortlet.