This page is an introduction to the basic concepts of Liferay and its development.

What is Liferay Portal?#

Liferay Portal is a JSR-168/JSR-286 compliant portal. It is a web application. In a nutshell, you can think of as the portal as one big servlet. It is a servlet that happens to be a portlet container. The portal source builds this portlet container using the Ant build tool and the JDK.

What is the Liferay bundle?#

The Liferay Bundle is Liferay Portal pre-deployed and pre-configured on an application server. You simply download, unpack, and run. No configuration necessary, other than having Java runtime installed on your machine. It comes in many different varieties. The most common is the Tomcat bundle. As of Liferay 5.1.1, these are the bundles available:

  • Geronimo+Tomcat
  • Glassfish 3
  • Glassfish 2 for AIX
  • Glassfish 2 for Linux
  • Glassfish 2 for OSX
  • Glassfish 2 for Solaris
  • Glassfish 2 for Solaris (x86)
  • Glassfish 2 for Windows
  • JBoss+Jetty 4.0
  • JBoss+Tomcat 4.0
  • JBoss+Tomcat 4.2
  • Jetty
  • JOnAS+Jetty
  • JOnAS+Tomcat
  • Pramati
  • Resin
  • Tomcat 5.5
  • Tomcat 6.0

The intent of these bundles is to quickly install and experience Liferay Portal without having to do any development builds. You don't even need to configure a database as it uses HSQL embedded database right out of the box.

Note: do not use HSQL in production. It is for demo purposes only!

Do I have to use the bundle?#

You can use the bundle as a starting point, and can deploy onto the bundle with code that you have. You can also use fresh copies of app servers or servlet containers and install Liferay onto it, but you need to do some extra steps before doing a deploy. You must install the Liferay Dependencies first. You can get those here:

For Liferay 5.1.1, it is listed as "Liferay Portal 5.1.1 Dependencies"

So for example, if you do not want to use the Liferay-Tomcat bundle and would rather go straight to Apache's site and download a vanilla Tomcat, you can do so, but you cannot do a deployment of your source code right away. You must install the Liferay Dependencies first, whereas with the bundle, this has been done for you.

Download Liferay Bundle#

Liferay Portal Source Code#

Liferay Download#

The Liferay Portal source is available under "Files for Developers" at:

For example, the source code for Liferay 5.1.1 is there listed as "Liferay Portal 5.1.1 Source."

SourceForge Download#

Alternatively, you can obtain the source code from The project is called "Liferay Portal" and the packages are here: The screenshot below shows the tree for version 5.1.1 and all packages. Fourth from the bottom, you can see ""

You can also look for previous Liferay version packages in the tree nodes underneath.

What is the source code?#

Simply put this package is the source code for Liferay portal. You can use Ant to deploy this code onto any number of application servers and/or servlet containers. However, it is not recommended to deploy directly from the source code. What is recommended is that you create or download the "Ext Environment." For an explanation of the EXT Environment, please see below.

Liferay EXT Environment / Liferay EXT SDK#

What is the EXT Environment?#

The Liferay EXT Environment is where you would ideally make changes to the portal itself. In other words, this is where you customize or "extend" the portal. You may ask, "Why can't we just make the changes to the portal source directly?" The answer is that you technically CAN, but if and when you have to upgrade, you will have a tough time sorting out what is out-of-the-box and what is customized. EXT Environment keeps things separate.

The EXT Environment has the portal source packed up within it, and gives you space for your custom code. When you deploy, everything gets packed up into one.

You can either build the EXT environment manually, or download the EXT SDK pre-built for you.

Build EXT Environment#

Instructions for Windows

Download EXT SDK#

If you do not wish to build this yourself, you can simply download it. Liferay has prepackaged it for your convenience.

Find it under "Files for Developers." For example, for 5.1.1, it is called "Liferay EXT SDK 5.1.1"

If I use EXT, why do I need the Liferay source code?#

You need it as reference. For example, if you wanted to change the behavior of the LoginPostAction class. You would do this in EXT. But you need to the original so that you can copy it over to EXT and modify it.

Liferay Plugins SDK#

What is the Plugins SDK?#

The Plugins SDK is an environment where you can develop and build layout templates, themes, and portlets so that they can be packaged into a separate WAR file. In earlier versions of Liferay, the Plugins SDK did not exist and much of the portlet development was done in the EXT Environment. Creating separate WARS for portlets was indeed possible, but the Plugins SDK made this process easier.

Download Plugins SDK#

Find it under "Files for Developers." For example, for 5.1.1, it is called "Liferay Plugins SDK 5.1.1"

Plugins SDK Development#

Portlets in EXT vs. Plugins SDK#

Portlets developed in EXT will be a part of the Liferay web app, while portlets developed in the Plugins SDK will be in their own WAR files. These are deployed as separate web apps, and more modular. Keep in mind you still need Liferay installed to have the plugins work. You can also hot deploy the plugins, so that you do not have to restart Liferay.

Liferay Development Environment#

It is possible to set up a develop EXT SDK and Plugins SDK development environments in different IDE's, including Eclipse, Netbeans, and IntelliJ. There are other wiki articles on how to set these up.

Source Control#

What exactly should you keep under source control?

1) EXT Environment

You can build your whole portal from EXT. Make sure and do an "ant clean" before checking your code in, otherwise you will include many generated files that change every time you do a build.

2) Plugins SDK

You may check in the entire directory, but some choose to only check in the directories that contain the source code for each individual portlet.

Where Do I Go From Here?#

Children Pages

0 Attachments
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Threaded Replies Author Date
A very good overview for beginners :) thanks! Dominik Hofbauer February 24, 2009 12:38 AM
Still misses the mark. Where's the "Liferay... Andrew Gruhn March 9, 2009 9:30 AM
Good overview! Thanks Irshad U Valimamod March 25, 2009 2:57 PM
I will prob sound like an idiot, but does... Ryan T August 4, 2009 4:06 PM
You need to have Liferay Portal SRC code . IF... Arvind Mishra August 22, 2009 12:07 PM
Roadmap for New Developers' link is not working. Fawad Ali August 5, 2010 9:20 AM
Noted, fixed! Thanks Fawad Samuel Liu August 12, 2010 12:15 PM
There is no "Liferay EXT SDK 5.1.1" or similar... M Menegazzo September 20, 2010 5:17 AM

A very good overview for beginners emoticon
Posted on 2/24/09 12:38 AM.
Still misses the mark. Where's the "Liferay for not Java Developers" section?
Posted on 3/9/09 9:30 AM in reply to dominik domih.
Good overview!

Posted on 3/25/09 2:57 PM.
I will prob sound like an idiot, but does anyone know where you can download the code for the preinstalled portlets? I want to modify the iframe portlet and I cannot find a place to download the preinstalled one, just a sun iframe.
Posted on 8/4/09 4:06 PM.
You need to have Liferay Portal SRC code . IF its a plugin portlet code will be in Plugin repository.
Posted on 8/22/09 12:07 PM in reply to Ryan Terwedo.
Roadmap for New Developers' link is not working.
Posted on 8/5/10 9:20 AM.
Noted, fixed! Thanks Fawad
Posted on 8/12/10 12:15 PM in reply to Fawad Ali.
There is no "Liferay EXT SDK 5.1.1" or similar link at additional files / files for developers section. Is this correct?
Posted on 9/20/10 5:17 AM.