Sun GlassFish Web Space Server 10.0 Administration Guide

Velocity Engine

Velocity Engine is a property in the portal.properties file, which is the default configuration file for Sun GlassFish Web Space Server. You can override this property using portal-ext.properties file.

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.


velocity.engine.resource.listeners=com.liferay.portal.velocity.ServletVelocityResourceListener,
com.liferay.portal.velocity.JournalTemplateVelocityResourceListener,
com.liferay.portal.velocity.ThemeLoaderVelocityResourceListener,
com.liferay.portal.velocity.ClassLoaderVelocityResourceListener

Set the Velocity resource managers. You can extend the Velocity's default resource managers for better scalability.

Note that the modification check interval is not respected because the resource loader implementation does not know the last modified date of a resource. This means you will need to turn off caching if you want to be able to modify VM templates in themes and see the changes right away.


velocity.engine.resource.manager=com.liferay.portal.velocity.LiferayResourceManager
velocity.engine.resource.manager.cache=com.liferay.portal.velocity.LiferayResourceCache
velocity.engine.resource.manager.cache.enabled=true
#velocity.engine.resource.manager.modification.check.interval=0

Input a list of comma-delimited macros that will be loaded. These files must exist in the class path.


velocity.engine.velocimacro.library=VM_global_library.vm,VM_liferay.vm

Set the Velocity logging configuration.


velocity.engine.logger=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
velocity.engine.logger.category=org.apache.velocity