Posted by Tahir Laliwala | 0 comments

Liferay Portlet & Portal Tips

Liferay Tips and Tricks
Background and purpose:
The purpose of this article is to share experiences of using the toolkit Liferay portlet in the portal. One can list here e.g. the tips how to speed up the portal. Please, feel free to edit this article!

How to speed up the portal?
 1. Edit the file. If you cannot find the file from [portal-root]/webapps/ROOT/WEB-INF/classes, you could should copy (and rename) it there from the [portal-root]/webapps/ROOT/WEB-INF/lib/portal-impl.jar.

The most common modification are listed below

· theme.portlet.decorate.default=false
· javascript.barebone.enabled=true
· javascript.log.enabled=false
· look.and.feel.modifiable=false
· session.timeout=5
· session.timeout.warning=0
· layout.parallel.render.enable=true
· layout.template.cache.enabled=true
· last.modified.check=false
· velocity.engine.resource.manager.cache.enabled=true
· com.liferay.portal.servlet.filters.compression.CompressionFilter=true
· com.liferay.portal.servlet.filters.strip.StripFilter=true
· com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter=true
· portlet.css.enabled=false
· tags.compiler.enabled=false

2. Put Apache2 server in front of Tomcat (or what ever application server you use) to serve all static content
· Tutorial for Debian
· see the attachments for the example, jk.conf, and jk.load files
· configure apache2.conf such that there is sufficient amount of worker threads
· enable gzipping
· remember to enable correct ports from file (e.g. web.server.http.port=80 and web.server.https.port=443)

3. Compile/install native apr libs for the Tomcat
· enable the apr adding the lines:
into [portal-root]/bin/ srcipt

* if the Tomcat has very slow startup with apr try to recompile apr with --with-devrandom=/dev/urandom option OR set the environment variable RANDFILE to point /dev/urandom OR use tcnative 1.1.10