3. system.properties

The system.properties file is provided as a convenient way to set all properties for the JVM machine and related system settings. Start your application server with the system property system.properties.load set to true to load it. When the server starts, the portal will load system.properties and then system-ext.properties.

Start your application server with the system property system.properties.final set to true if the properties of system.properties override all similar command line properties. If set to false, the properties of system.properties will be set if and only if those properties are not currently set.

Some application servers require you to set the file.encoding and user.timezone on startup regardless of system.properties because the application server reads these properties before system.properties is ever loaded.

Following the default values of the system.properties properties are shown:

##
## Java
##

    #
    # The file encoding must be set to UTF-8 in order for the
    # internationalization to work correctly.
    #
    file.encoding=UTF-8

    #
    # Java uses the underlying operating system to generate images. If you are
    # using Unix and do not start the portal in a X Windows session, then Java
    # will not know how to generate images and you'll get lots of nasty
    # exceptions. Setting this property to true will fix that. Sometimes this
    # property cannot be set dynamically when the server starts and you'll need
    # to edit your start script to include this as a system property.
    #
    java.awt.headless=true

    #
    # Set the default language.
    #
    user.country=US
    user.language=en

    #
    # The time zone must be set GMT so that the portal knows how to properly
    # translate time across time zones.
    #
    user.timezone=GMT

##
## Servlet Filters
##

    #
    # If the user can unzip compressed HTTP content, the compression filter will
    # zip up the HTTP content before sending it to the user. This will speed up
    # page rendering for users that are on dial up.
    #
    com.liferay.filters.compression.CompressionFilter=true
    com.liferay.filters.compression.CompressionFilter.encoding=UTF-8

    #
    # The strip filter will remove blank lines from the outputted content. This
    # will speed up page rendering for users that are on dial up.
    #
    com.liferay.filters.strip.StripFilter=true
    com.liferay.filters.strip.StripFilter.encoding=UTF-8

    #
    # The layout cache filter will cache pages to speed up page rendering for 
    # guest users. Set the refresh time in milliseconds on how often the cache
    # should refresh. Set it to 0 if the cache never times out. Default time out
    # is set to one hour.
    #
    com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter=true
    com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.encoding=UTF-8
    com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.refresh.time=3600000

    #
    # The virtual host filter maps hosts to public and private pages. For
    # example, if the public virtual host is www.helloworld.com and the friendly
    # URL is /helloworld, then http://www.helloworld.com is mapped to
    # http://localhost:8080/web/helloworld.
    #
    com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter=true

    #
    # The CAS filter will redirect the user to the CAS login page for SSO. See
    # http://www.ja-sig.org/products/cas for more information.
    #
    com.liferay.filters.sso.cas.CASFilter=false

##
## Logging
##

    #
    # Set any logger that implements org.apache.commons.logging.Log.
    #
    #org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

    #
    # Set the following to true if Log4j complains that it was not properly
    # configured.
    #
    log4j.configure.on.startup=true

##
## Encryptor
##

    #
    # Set the security provider class.
    #
    com.liferay.util.Encryptor.provider.class=com.sun.crypto.provider.SunJCE

##
## HTTP
##

    #
    # Set the location of the HTTP proxy that the portal will use to fetch
    # external content.
    #
    #http.proxyHost=192.168.0.200
    #http.proxyPort=4480

    #
    # These are read for backwards compatibility and only used if the
    # "http.proxyHost" and "http.proxyPort" settings are not specified.
    #
    #com.liferay.util.Http.proxy.host=192.168.0.200
    #com.liferay.util.Http.proxy.port=4480

    #
    # Set the proxy authentication type.
    #
    #com.liferay.util.Http.proxy.auth.type=username-password
    #com.liferay.util.Http.proxy.auth.type=ntlm

    #
    # Set user name and password used for HTTP proxy authentication.
    #
    #com.liferay.util.Http.proxy.username=
    #com.liferay.util.Http.proxy.password=

    #
    # Set additional properties for NTLM authentication.
    #
    #com.liferay.util.Http.proxy.ntlm.domain=
    #com.liferay.util.Http.proxy.ntlm.host=

    #
    # Set the connection timeout when fetching HTTP content.
    #
    com.liferay.util.Http.timeout=5000

##
## Format
##

    #
    # Set the location of the class that implements
    # com.liferay.format.PhoneNumberFormat. This class will format phone
    # numbers.
    #
    com.liferay.util.format.PhoneNumberFormat=com.liferay.util.format.USAPhoneNumberFormat
    #com.liferay.util.format.PhoneNumberFormat=com.liferay.util.format.IdenticalPhoneNumberFormat

##
## Axis
##

    #
    # Urls that match the specified pattern will use the SimpleHTTPSender. Urls
    # that do not match the specified pattern will use Axis' default HTTPSender.
    #
    com.liferay.util.axis.SimpleHTTPSender.regexp.pattern=.*mappoint\.net.*

##
## XSS (Cross Site Scripting)
##

    #
    # Set the pattern to strip text of XSS hacks.
    #
    com.liferay.util.XSSUtil.regexp.pattern=(?i)<[\\s]*/?script.*?>|<[\\s]*/?embed.*?>|<[\\s]*/?object.*?>|<[\\s]*a[\\s]*href[^>]*javascript[\\s]*:[^(^)^>]*[(][^)]*[)][^>]*>[^<]*(<[\\s]*/[\\s]*a[^>]*>)*

##
## Upload Servlet Request
##

    #
    # Set the maximum file size. Default is 1024 * 1024 * 1000.
    #
    com.liferay.util.servlet.UploadServletRequest.max.size=104857600

    #
    # Set the temp directory for uploaded files.
    #
    #com.liferay.util.servlet.UploadServletRequest.temp.dir=C:/Temp

##
## Session Parameters
##

    #
    # Encrypt session parameters so that browsers cannot remember them.
    #
    com.liferay.util.servlet.SessionParameters=true

##
## Lucene
##

    #
    # Set a timeout to avoid lock errors.
    #
    #org.apache.lucene.writeLockTimeout=30000

##
## Quartz
##

    #
    # Make threads daemon so the JVM exits cleanly.
    #
    org.quartz.threadPool.makeThreadsDaemons=true

##
## Velocity Engine
##

    #
    # Input a list of comma delimited class names that extend
    # com.liferay.util.velocity.VelocityResourceListener. These classes will
    # run in sequence to allow you to find the applicable ResourceLoader
    # to load a Velocity template.
    #
    com.liferay.util.velocity.VelocityResourceListener=com.liferay.portal.velocity.ServletVelocityResourceListener,\
com.liferay.portal.velocity.JournalTemplateVelocityResourceListener,\
com.liferay.portal.velocity.DefaultVelocityResourceListener