Chapter 1. Configuration Options

Table of Contents

1. Customizing the configuration
2. portal.properties
3. system.properties

Liferay has been built to be highly customizable through the web and through configuration files. This chapter reviews the two files where Liferay Portal stores its configuration, portal.properties and system.properties, and how to override their values.

1. Customizing the configuration

Liferay provides an easy way to override the properties of its configuration files. This can be done through the files portal-ext.properties and system-ext.properties that can be created and stored in any place in the classpath. When the Liferay extension development environment is used these files are already present in the directory ext-ejb/WEB-INF/classes. Otherwise, it is recommended to store them in the global classpath of the application server. For example:

  • Tomcat: place them in TOMCAT_DIR/shared/classes

  • JBoss: place them in JBOSS_DIR/server/default/conf

  • Other application server: read the documentation provided with them.

Let's see an example of how to customize Liferay Portal's configuration. In this example Liferay Portal has been installed using the Tomcat bundle and then a custom theme called mytheme has been deployed as a WAR (using the procedure explained later in this document). The administrator wants this theme to be used by default in any newly created desktop or community. To achieve that he/she looks in portal.properties and finds that the property default.theme.id can be used to set the default theme and default.color.scheme.id the default color scheme of that theme. In this case the theme only has one color scheme called mycolorscheme so the administrator creates the file portal-ext.properties in JBOSS_DIR/server/default/conf with the following contents:

    default.theme.id=mytheme
    default.color.scheme.id=mycolorscheme

After a server reboot the new properties are applied to the portal. The following sections include an annotated copy of both portal-ext.properties and system-ext.properties that can be used as a reference of the available properties.

[Note]Note

Liferay uses EasyConf to read portal.properties, so all functionalities provided by this library are also available. You can read more about it in EasyConf's website