Liferay Support for Free: One year of FREE support for Sun Users

Liferay Portal for Sun Portal Customers

Sun-Liferay Background

This session is for cutomers of Sun Java System Portal Server and Sun Web Space Server to help them determine their best course of action following the Oracle acquisition of Sun. In 2007, Liferay Portal was chosen by the Sun Microsystems product team to replace the Sun Java System Portal Server. The Sun engineering team worked with the Liferay community to release a Sun-supported version of Liferay Portal called the Sun Web Space Server and then initiated an End of Life (EOL) process for the Sun Java System Portal Server.  With the acquisition of Sun by Oracle, customers of both Sun products now face an End of Feature Life, which means customers will not benefit from new development for either platform. Liferay’s upcoming releases provide a substantial improvement in performance, quality, support, and feature set over Sun’s former products.

SPECIAL OFFER: One Year Free for Sun Portal Customers
For a limited time, Liferay, Inc. will offer users of Sun Portal and Sun Web Space Server one year of FREE enterprise support.

This offer is through our new “Design with Liferay” Program, created to help enterprises worldwide efficiently manage their transition to a new platform. Rather than a migration program, the Design with Liferay program helps customers implement Liferay at lower cost and risk.

Please email or attend our free Liferay LIVE web event to learn more, including:

  • The background of the Sun Portal and Sun Web Space roadmap
  • Specific important Liferay features
  • How the “Design with Liferay” program can help Sun customers plan for the future

Register Now

We look forward to seeing you online!
The Liferay Team

Contact Us

Please email with your questions.

Liferay Celebrates its 10th Birthday

This year marks the 10th anniversary of Liferay Portal. Brian Chan began development in 2000 and Liferay has very quickly become the premier platform for building dynamic and effective enterprise applications. With 3 million downloads, 250,000 deployments, and a healthy community numbering 30,000, Liferay has been enjoying explosive growth in our 11th year.

This year also marks our 6-year anniversary as a commercial open source company and we are celebrating important milestones:

  • Hundreds of enterprise customers including Cisco Systems, Electronic Arts, and Société Générale
  • Over 60 partners in our worldwide network
  • Recognition as a Visionary in Gartner’s Magic Quadrant two years running
  • Strong revenue growth and global support coverage from offices in North America, Europe, Brazil, India, and China

Thank you for your support and we look forward to working with you in 2010!

Bryan Cheung
Liferay, Inc.

Best Comparation of LifeRay vs Alfresco

Many Think of what is the difference between Liferay and Alfresco.

Here are some of the Comparations.

Comparation of LifeRay vs Alfresco



  • Document Library & Image Gallery
  • Web Publishing
  • Integration with Microsoft Office®
  • Search Engine Optimization (SEO)
  • Multiple File Uploads
  • Workspace Publishing
  • Easy Integration
  • Live Page Editing and Scheduling
  • Dynamic Tagging
  • Multi-Tier Search
  • Dynamic Virtual Hosting
  • Asset Publisher
  • Multi-language Support
  • Drag-and-Drop Site Maps
  • Library Services – Check-in/out; minor and major version control
  • Auditing Services – Who created, who updated, when created, when updated, when read, when logged in
  • Search Services – Combined metadata, content, location, object type and tag search. OpenSearch support
  • Transformation Services – Extensible engine with large number of in-built transformations including Office to PDF or Flash
  • Thumbnailing Services – Content thumbnailing of first page
  • Content Modeling – Create new content types without the overhead of inheritance
Collaboration and Social Features
  • Wikis
  • Message Boards
  • Blogs
  • RSS
  • Activity Tracking
  • Instant Message
  • Email
  • Shared Calendar
  • Announcements & Alerts
  • Polls
  • REST based Services – Site, person, invite, activities, preferences, discussion, blogging and commenting
  • Activity Services – Activity feed on the “who, what, when and where” of repository services – new or edited content, comments, new team members, critical calendar dates
  • Out-of-the-box Tools
  • SOA Framework
  • Secure Single Sign On (SSO)
  • Granular, Role-Based Authorizations
  • Communities & Organizations
  • Single-Click Configuration
  • Dynamic Drag & Drop
  • Work From Your Desktop
  • Search & Tagging
  • Personal User Pages
  • Multi-language Support
  • Choice or hardware, operating system, database, application server, web server, load balancer, portal, browser, Office
  • Simple download and installation
  • Zero footprint client
  • Security and user management with users, groups and roles
  • Document-level security
  • Single sign-on through NTLM or LDAP
  • Workflow Services
  • Rules and Aspects Services
  • Multi-Tenancy
  • Single Unified Repository
  • Most Scalable Java Content Repository
  • High availability clustered, federated or replicated architecture
  • Deployment and Staging services
  • Pluggable Services Architecture – e.g. new transformation engines for video
1. Liferay is by heart a portal solution with a very strong & active community behind it and an impressive clientele to prove its credentials. Alfresco is an Enterprise Content Management Software which also has an equally powerful & vigorous community supporting it and an imposing set of customers using the software. This is again, the most admired ECMS solution available in today’s open source market.
2. Liferay has been wonderful in handling portal problems and its scalability have been the main driver that helped itself to be adopted in a variety of business verticals. However, as since its primary focus has been a portal solution, the document and content management capabilities of this framework does not make it very much enterprise ready, and not at all extensible, specially if we compare it with proper document and content management systems. However, the collaboration features of Liferay are definitely quite powerful. On the other hand, Alfresco has been fantastic as an Enterprise Document and Content Management solution. The framework’s architecture, functionality and extensibility makes it really the best choice for an enterprise business. Having features like customizable workflow, templated UI, user-defined data-types, powerful rules engine etc makes this one of the best ECMS solution. Conversely, since it is not intended to be a collaboration solution, these features are not very well provided.
3. Good Web Interface The Web interface is not at all suitable for business users.
4. In case of Integrated Solutions iferay providing the portal environment while Alfresco sits at the lower level of the stack supplying the content management services.
5. support Single Sign On support Single Sign On
6. standard LDAP providers standard LDAP providers
7. Alfresco can be integrated in Liferay Alfresco Web Script is a very great framework which makes this solution even more feasible and extensible. Web Scripts can be used as a pltaform of SOA architecture based solution as well as these can be used as standard JSR portlets deployed in Liferay.
8. Targets Collaborative Document Management System Targets Collaborative Document Management System
9. Liferay has launched Liferay Social Office, offers features such as Wikis, Blogs, Document Libraries, Calendar, Sites, Message Boards, Activities etc – On the other hand, Alfresco has also launched Alfresco Share, offering almost similar features like Document Library, Sites, Wikis, Blogs, Activities, SharePoint protocol support etc.
10. Liferay started out as a project for a local church and grew into one of the most popular open source portal systems around (in a very competitive portal market). Alfresco’s heritage is in large companies like Documentum and Interwoven and they have quickly become one of the most recognizable names in open source content management.

Now the big question is, where these two systems are leading to? As the document management, record management features are not main focus of Liferay, similarly the collaboration features are not the most important offerings of Alfresco.

It will be quite interesting to see in next few months or years how these systems grow and place themselves as complementary or competitive solutions.

In no question that Liferay in race till now but Alfresco is going to be the competitor for Liferay in near future

REPLAY: Liferay and the Future of Portal Development Thursday, Jan 28 @ 10AM PT/ 1PM ET (GMT-8)

Couldn’t attend the first time? We will be running this webinar again!
Liferay’s Chief Marketing Officer, Paul Hinz, will review Liferay’s strategies for open source and impact on the industry. He will discuss key points on the futures of open source, plus Liferay’s visions for Web, Portal, and Social Collaboration technologies.

Note: Those who registered for our webinar on Jan 21st will not need to re-register. Please use the existing link to the event that was provided in your confirmation and reminder emails.

If you have not registered, please choose your preferred date and time below:
Thursday, Jan 28 @ 10AM PT/ 1PM ET (GMT-8)

Register Here :

Thursday, Feb 2 @ 6AM PT/ 9AM ET (GMT -8)

Register Here :

We look forward to seeing you online!

Invite a Friend

Tell your colleagues about this webinar.

Liferay Webinar for January 2010

Only 2 more days to register for the upcoming webinar!

Kick off 2010 with Liferay’s senior leaders in a complimentary webinar on Liferay’s strategies for open source and impact on the industry. This webinar will review key points on the futures of open source, plus Liferay’s visions for Web, Portal and Social Collaboration technologies. This event will benefit everyone from the CxO, IT Manager, to the developer.

Please join us online: Thursday, January 21, 2010 @ 10:00am PST / 1:00pm EST

Register Here :

Invite a Friend

Tell your colleagues about this webinar.

Contact Us

Need help with registration? Send us an email before Thursday, January 21, and we’ll be sure to get the dial-in information.

How to Create a Struts Portlet using Liferay Plugin Sdk

There is an article available at Liferay Wiki to help you develop a Struts Based Portlet using there Plugin SDK, but chances are pretty high that the article alone wont suffice.

Here are a few problems you might face when you develop a Struts based Portlet.

1. You might get errors for ActionForward, ActionMapping and so on.
2. Your project will have compilation problems.

Here are a few simple steps to create a Struts Based portlet:

1. Download plugin-sdk from
2. Create a new project in your eclipse using this plugin.
3. Modify the Make another copy of the same as and place it at same location.
4. Change the file to give your tomcat location. Also tell the deploy folder location where it will dump war file.
5. Before you create a new Struts Portlet, check for your ant. Go to command prompt and type ant. If it gives some message you are fine. Else you need to set ANT_HOME variable like your JAVA_HOME
6.When you create a new Struts Portlet using SDK then you must create and action class which extends StrutsAction and implements its methods like doView().

Like for example:

public class SampleStrutsAction extends StrutsPortlet {

public void doView(RenderRequest req, RenderResponse res)
throws IOException, PortletException {

super.doView(req, res);

7. After creating this class you need to refer it in the portlet.xml file:
Create an entry like:

8. Now you are ready to create an action class having the render() and processAction() methods.

9. You may need to do one more thing, that is attaching the Liferay Portal Source Code if you want to add more functionality to your Portlet.

A sample struts portlet can be found here. Just deploy it to see that it works fine. Then import it to view the structure.

One more thing, attach portlet.jar, portal-kernel.jar and struts.jar to your plugin sdk.

Compile your portlet and then deploy.

Problems installing Liferay Source Code 5.2.3 + Tomcat


We are trying to install Liferay Source Code in order to execute it in Tomcat. After following several installation guides, we don’t have obtained any good results.

“ant build” and “ant deploy” commands always finish showing “build succesful” and Tomcat logs don’t show any error when we type ./startup

When we access to localhost:8080/web/guest/home, the browser shows a blank page (don’t show anything) and Tomcat logs show no errors. We have used an existing Tomcat, a new Tomcat into Liferay directory and a new Tomcat out of Liferay directory, and Tomcat versions 5 and 6, and the result is the explained below. So, we think that Liferay is not linked succesfully to Tomcat when we type “ant deploy” command

The only modification we make in Liferay configuration files are in y, and the copies of these files including the Linux username in the file name

In app.
app.server.parent.dir= the folder where we unzipped tomcat (if tomcat is in /opt/tomcat, this property were /opt)
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-5.5.26 (or the adecuate version)

lp.source.dir=the folder where we unzipped
lp.ext.dir= ${lp.source.dir}/ext
lp.plugins.dir= the default value, because we don’t know what is the plugins sdk for or if they are needed

Our purpose is to get a Liferay SC installation in order to make some changes in the login portlet and then re-compile Liferay with the new changes. We need to know how to solution these problems or another development alternative

I hope this helps:

Running liferay behind Apache2 mod_jk and Tomcat6 on Debian

I cant figure out what i need to do to configure apache2 to talk to tomcat on my Debian linux environment. I have liferay running on Tomcat which i can access via the following URL


I am trying to configure Apache2 using mod_jk to allow me to access liferay using something like but everything i do just returns the following error

2The requested URL /liferay was not found on this server.
3Apache/2.2.9 (Debian) mod_jk/1.2.26 PHP/5.2.6-1+lenny3 with Suhosin-Patch Server at Port 80

Here is my configuration



2hpmedia:/etc/apache2/sites-available# cat liferay
3<VirtualHost *:80>
4 ServerAdmin webmaster@localhost
5 JkMount /liferay default
6 DirectoryIndex index.php index.html
8 ErrorLog /var/log/apache2/error.log
10 # Possible values include: debug, info, notice, warn, error, crit,
11 # alert, emerg.
12 LogLevel warn

There is a symbolik link in sites-enabled that points to the above file.

changes to /etc/apache2/apache2.conf

2JkWorkersFile /data/resourceRepository/internal/workarea/liferay/liferay_home/apache-tomcat-6.0.20/conf/
4JkLogFile /data/resourceRepository/internal/workarea/liferay/liferay_home/apache-tomcat-6.0.20/logs/jk.log
6JkLogLevel info
8JkLogStampFormat “[%a %b %d %H:%M:%S %Y]”
10JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
12JkRequestLogFormat “%w %V %T”


2LoadModule jk_module /usr/lib/apache2/modules/

My environment is as follows

Debian 5.2
Tomcat 6
Liferay 5.2.3

Is there anything i am doing wrong in the above configuration?

here are my virtual hosts files in /etc/apache2/sites-enabled

2<VirtualHost *:80>
3 ServerAdmin webmaster@localhost
5 DocumentRoot /data/resourceRepository/internal/workarea/joomla/bravaonline
6 <Directory />
7 Options FollowSymLinks
8 AllowOverride None
9 </Directory>
10 <Directory /data/resourceRepository/internal/workarea/joomal/bravaonline/>
11 Options Indexes FollowSymLinks MultiViews
12 AllowOverride None
13 Order allow,deny
14 allow from all
15 </Directory>
17 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
18 <Directory “/usr/lib/cgi-bin”>
19 AllowOverride None
20 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
21 Order allow,deny
22 Allow from all
23 </Directory>
25 ErrorLog /var/log/apache2/error.log
27 # Possible values include: debug, info, notice, warn, error, crit,
28 # alert, emerg.
29 LogLevel warn
31 CustomLog /var/log/apache2/access.log combined
33 Alias /doc/ “/usr/share/doc/”
34 <Directory “/usr/share/doc/”>
35 Options Indexes MultiViews FollowSymLinks
36 AllowOverride None
37 Order deny,allow
38 Deny from all
39 Allow from ::1/128
40 </Directory>

and the second one which i want to point to the tomcat installation is

3 ServerAdmin webmaster@localhost
4 ServerName
5 ServerAlias
7 JkMount /lifer* default
8 DirectoryIndex index.php index.html
10 ErrorLog /var/log/apache2/error.log
12 # Possible values include: debug, info, notice, warn, error, crit,
13 # alert, emerg.
14 LogLevel warn

i changed it slightly to try and access it using but i still get the same problem.

I setup a similar environment using these steps:

set up liferay-portal with netbeans 6.5 – Community forums – Liferay

Basic Configuration

Download Netbeans IDE and install it. Be careful with you will need Java Development Kit installed on you computer. Well, you can get Netbeans bundled with JDK here.

After that, download Liferay Source Code from here. You find it in the end of the page, in the section Files for Developers.

When you have installed Netbeans IDE and running, you add a new project called liferay.


Building Stand-alone Portlets

To create a portlet application that resides in a stand alone .war file, you will need Netbean’s Portal Pack. Then you will add some liferay specific functionality to prove you can, and deploy it to Liferay.

You will need:

  • The Portal Pack, just the plugin, not the app server or portlet container
  • Liferay code > 4.2.1 ( i used svn co )
  • To have built the ext environment because we’ll use some services to make the tutorial worth while
  • To create the library tutorial service section of one of the many tutorials like this one. We’ll only use the db objects and services created in these tutorials.
  • For deployment, I’m using the liferay-jboss-tomcat bundle but it should work with any other bundle

Creating the Portlet App

Note: If you are using Netbeans 6.0 beta 1, the following instructions do not apply to you since the Portlet support has been added to the webapp support. Please refer to the Netbeans site for more details.

  1. Create New Project by clicking File/New Project
  2. From the New Project wizard, choose Portlet Applications in the Categories sechtion and then JSR-168 Portlet Application in the Projects section. Click Next >
  3. Provide a Project Name and you can choose to leave or change the rest of the stuff. Click Finish

As it is the project has been created, you could right click in the project in the Projects window and choose Clean and Build Project, which will create a .war file in the projects dist folder that can be hot deployed to Liferay using the Admin portlet.

The wizard created a class file for you, we’ll call it your portlet class from now on. The wizard also created 3 jsp files for you, we’ll only change the view.jsp which can be found in the Web Pages/WEB-INF/jsp node in the Projects window. You can see that your portlet class points to that path and file in the doView method.

Adding Liferay’s stuff

To make this tutorial worth your while, we’ll use some Liferay specific methods and objects. We’ll create a portlet that presents a simple form similar to the one you may have done in the library struts portlet, which will create books and will list the books’ in a very ugly table…

First, we want to add to Netbeans all the dependencies of our project using the Library Manager found in the Tools menu. We could add the dependencies directly to the project but then we would have to do it for every portlet.

  1. Click on Tools/Library Manager, which brings up the, well, Library Manager
  2. Click on the New Library button, name your library Liferay
  3. In the Classpath tab, add the following jars that must have been created if you did the library tutorial for struts or jsf
    1. portal-kernel.jar found in liferay’s code in the portal-kernel folder
    2. portal-service.jar found in liferay’s code in the portal-service folder
    3. ext-ejb.jar found in your ext environment in the ext-ejb folder
    4. ext-service.jar found in your ext environment in the ext-service folder
  4. Add the sources if you want, as well as the documents, then click Ok

Now we need to add the library to the project.

  1. Right clicking on the project in the project window and selecting Properties
  2. Select Libraries from the Categories section.
  3. Click Add Library and select Liferay then Click Add Library
  4. Uncheck any checks in the Package column, you don’t need to deploy these with your jar, they are only good for autocompletion, compilation, etc.
  5. Click Ok

Code Stuff

We’ll pass some data to the view and add an action method to your portlet class.

Your doView method will look like this:

    public void doView(RenderRequest request,RenderResponse response) throws PortletException,IOException {

        // we just want to show we can use some liferay's stuff here   
        try {
            if (PasswordTrackerLocalServiceUtil.isValidPassword("", "test")) {
                System.out.println("--------- El passowrd es valido!!! -------");
        } catch (Exception e) {
            System.out.println("------- Error: " + e.toString());

        // we want to get a list of books (from the library tutorial) and pass them to the view.jsp
        try {
            // wrapper in BookLocalServiceUtil which returns BookUtil.findAll(), from library tutorial
            List<Book> books = BookLocalServiceUtil.getAll(); 
            request.setAttribute("books", books);

        } catch (Exception e) {
            System.out.println(" ---- Error en el libro!!! --- "+e.toString());

        PortletRequestDispatcher dispatcher =
        dispatcher.include(request, response);


Now add to the following method to the same class

    public void proessAction(ActionRequest request, ActionResponse response) throws PortletException, IOException {
        try {
            BookLocalServiceUtil.addBook(request.getRemoteUser(), request.getParameter("book_title"));
        }catch(Exception e){

By now your code probably has tons of little red underlines, meaning you have erros… These are due to import problems… Netbeans will fix them for you if you right click on the code window and select Fix Imports

Your code should be able to compile now.

View Stuff

We’ll change the view.jsp file to display the books and be able to add more. In the end, your jsp should look like this:

  <%@page contentType="text/html"%>
  <%@page pageEncoding="UTF-8"%>
  <%@page import="javax.portlet.*"%>
  <%@taglib uri="["] prefix="portlet"%>
  <portlet:defineObjects />
  <%PortletPreferences prefs = renderRequest.getPreferences();%>
  <%@ taglib uri="["] prefix="c" %>
  Some books 
  <table border="1">
    <c:forEach var="book" items="${requestScope.books}">
            <td><c:out value="${book.bookId}"/></td>
            <td><c:out value="${book.userId}"/></td>
            <td><c:out value="${book.title}"/></td>

  <form action="<portlet:actionURL
      windowState="<%= WindowState.NORMAL.toString() %>">
      <portlet:param name="action" value="addBook"  /></portlet:actionURL>"
      method="post" name="<portlet:namespace />fm">
   Book Title:
   <input name="<portlet:namespace />book_title" size="20" type="text" value="">
   <input type="button" value="Submit" onClick="submitForm(document.<portlet:namespace />fm);">

That is about it! if you do Clean and Build Project you should be able to hot deploy the .war file and see your portlet work!

Efficient Deployment

I modified my build script in netbeans so that when I clean and build the project it is hot deployed to the server.

Click on the Files window, find the build.xml file in your project, open it and add the following to the end of it:

    <target name="-post-dist">
        <!-- want to delete work forlder in jboss to prevent jsp caching-->
        <basename property="" file="${dist.war}" suffix=".war"/>
        <delete dir="${user.home}/Java/liferay-portal-jboss-tomcat-4.2.1/server/default/work/jboss.web/localhost/${}" />
        <!-- want to copy to liferay's deploy folder -->
        <copy file="${dist.war}" toDir="/home/liferay/deploy" />

With this, and the hot deploment setting in the Admin portlet set to 5 seconds, i’m able to do changes in the code and rebuild the project with almost no wait time (6 seconds or less at the moment).


If you know how to start your apps server in debug mode, and tell Netbeans to put debug symbols in the build (look at the Properties/Build/Compiling/Generate Debugging Info checkbox), you can tell Netbeans to connect to a remote server by clicking on the Attach Debugger icon or menu item, set the right port and then set breakpoints in your code as with any other app…

Netbeans Profiler

leaks or performance profiling, I recommend the NetBeans profiler. It’s a free, but powerful profiler:

To install:

  1. Install Netbeans IDE 5.5
  2. Install Netbeans Profiler 5.5
  3. For profiling JDK 1.4.2 applications, download Netbeans JFluid Modified JDK, then from the Tools|Update Center, choose “Install Manually Downloaded” to install. Then do this step once: Profile|Advanced Commands|Run Profiler Calibration
  4. For profiling JDK 1.5+ applications, no additional downloads required. JDK 1.5+ has the new JVM Tool Interface API.

To run the profiler:

  1. Go to Profile|Attach Profiler, click on Attach Wizard:
  2. Select Target Type: J2EE Web/App Server, Server Type: Tomcat 5.5
  3. For profiling with JDK 1.4.2: Target settings: Local, Dynamic Working dir: ..\servers\tomcat\bin, Attach using server PID
  4. For profiling with JDK 1.5+: Target settings: Local, Direct (cannot be dynamically attached)
  5. Click next, choose Automatic, click Next. Tomcat Installation: …\servers\tomcat
  6. Choose Server JVM
  7. click Next, click Next
  8. Check “Automatically start the server after this Wizard finishes.”
  9. click Finish

…or start manually from command-line in tomcat\bin:

 catalina_nbprofiler start

Next select a profiling task, then click Attach.

For info on using the profiler, read

For faster server startup, use the “Monitor Application” task (the other profiling tasks require more resources). After the server has started up, then go to the Profiler | Modify Profiling… menu and select the new task.

For tracking down memory leaks, use the “Analyze Memory Usage” task with the “Record Stack Trace for Allocations” option checked. This shows where leaking objects were created. If this configuration crashes when you take a snapshot, then the workaround is to add this to the command line that starts the server:

  • Xnoclassgc

If you get a redefinition error on a generated JSP class while profiling Tomcat during a load test, then the JSPs need to be precompiled. To do this, add this to${}.properties then deploy again: jsp.precompile=on

JDK 1.4.2 notes: In older NetBeans/JDK 1.4.2 sometimes it couldn’t dynamically attach, but going through the Attach wizard works everytime. From the dropdown select the process and click OK.