What is Liferay? - A complete beginners tutorial

Liferay Portal is an open-source enterprise portal software declared as the Best open-source Portal by InfoWorld in 2007. It allows creating a web portal adopting flexible architecture and divides a webpage into a theme, layout, and portlets. In this comprehensive Liferay tutorial, we will learn the basic concepts of Liferay and its features.

 Liferay Tutorial for Beginners

In this Liferay Tutorial, I will be discussing the following topics:
  1. What is Liferay?
  2. Why should businesses use Liferay?
  3. Features of Liferay
  4. Download Liferay
  5. Liferay Eclipse Plugin
  6. How to create a Liferay Plugin Project and Portlet?
  7. Database Design
  8. Employee Model
  9. Managed Bean
  10. JSF View
  11. Employee DAO and Database Utility
  12. Registration Demo

What is Liferay?

Liferay is an open-source Enterprise software development platform based on modern J2EE technology. It is a leading Portlet container that is used for creating a standard, scalable, and enterprise web application.

This Portlet technology follows JSR 168 and JSR 286 complaints, including many portlets, and each portlet has its response and request.

It sends a request and gets a response from the server; then, the response belongs to the portal only that sends the request. 

The Liferay portal includes a set of portlets and is used to build a web application and develop a new portlet application. It has a framework and standards to add a new feature and customize the existing portal.

Liferay has two types of portals.

1. Liferay Community Edition

Liferay Community Edition is an open-source portal and can get source code to add or customize the application. It includes an excellent working group and community people and allows users to contribute their work to the Liferay community.

2. Liferay Enterprise Edition

Liferay Enterprise Edition is a paid portal that has an enterprise permit from Liferay Inc. It includes several advantages over the Liferay Community Edition. 

Why should businesses use Liferay?

Liferay is a dynamic and highly scalable platform that interactive websites and enterprise portals are created. Liferay DXP includes several functions called portlet that provide extensive support for various programming languages such as C++, .NET, Java, PHP, etc.

If you want to enrich your career and become a professional in Liferay, then visit Mindmajix - a global online training platform: "Liferay Training" This course will help you to achieve excellence in this domain.

There are many reasons to consider using Liferay Portals in organizations. 

  • Liferay tool includes more than 60 portlets, and these portlets are available with the drag-and-deploy feature. The same portlet can be used for various websites by a single user.
  • It can work using HTML5, CSS, XHTML, and a host of other design methods. It provides UI/UX compatibility with its drag-and-drop feature used to move different entities in the portlets.

  • It offers unique workflow APIs for an excellent user experience and allows users to create and apply workflow with custom entities.

  • Liferay is a Java-based platform, and it is easy to implement the application using different resources available in the market.

  • It allows users to personalize the web portals and website pages and easily allows a robust Enterprise Content Management System to Add/Remove/Edit the content on websites and portals.

  • It allows users to integrate with modern and existing technologies such as Spring, Hibernate, JBoss, and other such databases. 

MindMajix Youtube Channel

Features of Liferay

The features of Liferay are as follows:

  • Liferay is a programming interface for Java developers, and administrators can install the website without having technical knowledge.
  • It provides extensive support for various platforms such as documents, files, bookmarks, web content, wiki pages, blogs, etc.

  • The administrator or user can edit, add, and customize Liferay's portlets' attributes without modifying the company database.

  • It offers a simplified User Interface for different users and allows users to use a single presentation layer for all businesses.
  • It enables users to access the application by logging through the Secure Single Sign-On to integrate with different end-users systems.

  • It provides a single-click configuration so that everyone can use the benefit of a fast User Interface.

  • It offers a set of performance accessing tools to the administrator.

  • It allows users the drag-and-drop feature to move various entities of portals.

  • Liferay allows users to create the workflow as per the operational requirements and offers workflow APIs for a better user experience.

Download Liferay

To download Liferay, follow the below steps and ensure that you have installed the Liferay portal and ran through the Eclipse.

  1. Use the link to download the new version of Liferay Portal.
  2. Extract the zip file into the directory.
  3. Restart the Eclipse and ensure that you can define the new Liferay Server.

Liferay 1

     4. Click Next and extracted the Liferay file to browse them.

     5. Click Next and Finish.

     6. From the Servers pane, start the server.

     7. Wait until the server gets started and opens the browser.

Liferay 2

   8. Fill in the details and click Finish Configuration.

   9. A message appears on a successful configuration and clicks Go to My Portal.

Liferay 3

  10. Accept the terms and Enter the required Login credentials and click save.

  11. A Liferay Dashboard appears on the screen.

Liferay 4

Liferay Eclipse Plugin

To create a Liferay Portlet, an Eclipse Plugin has to be installed. It helps you to create a Liferay Portlet along with the properties to deploy. To install Liferay Eclipse Plugin, do the following steps.

  1. In the Eclipse IDE help menu, select Install New Software.
  2. Add the latest Liferay tools link to start working.

Liferay 5

  1. Click Next and Accept the terms and conditions. 

  2. Click Finish.

How to create a Liferay Plugin Project and Portlet?

Liferay plugin is used to obtain an example of Liferay JSF Portlet and provide a broad range of Liferay Portlet types and containers. To create a Liferay Portlet, do follow the steps below.

  1. In Project Explorer, right-click on it and select New from the list.
  2. In the Liferay, select Liferay Portlet from the menu and click Next.

  3. Eclipse asks you that if you want to open the new Liferay Plugin Project wizard, answer yes. It enables you to create the Liferay Portlet as Liferay Plugin.

  4. New Liferay Plugin Project window opens, fill in the details required.

Liferay 6

5. Click Create New Maven Profile depending on the Liferay Runtime that is next to the Active Profiles input.

Liferay 7

6. Click Next and select the portlet framework JSF 2.x.

Liferay 8

7. Click Next and select the JSF Component suite, enable JSF standard.

Liferay 9

8. Click Finish.

Database Design

Database design is a design that illustrates the details that are stored in the database. For instance, an Employee table, as shown in the figure.

Liferay 10

And you will be able to create a database with SQL queries.

Employee Model

Employee Model is a model that is defined to pass the data like the regular Java class.

Managed Bean

As per the JSF, the managed bean is used to handle the presentation logic, which embeds the view. For example, an employee must be saved over our database; the managed bean has characterized a register Listener technique liable for saving the Employee.

This is the JSF implementation responsibility, and so it should focus on the business requirements instead of getting involved with ad-hoc work.

JSF View

We have a single view responsible for entering employee’s details and notify them if the operation was completed or went wrong.

The detailed description of the code must include the following.

  • Employee’s Identifier is required; if you exclude it, the form will notify you.

  • The identifier should include a set of numbers.

  • An employee’s Salary is required, and it even has a set of numbers.

  • Employee’s Salary should be 2-4 digits.

  • Messages will help you to get notified of the status of the operation.

  • Register submit action offers you to send the entered information to be saved.

EmployeeDAO and Database Utility

EmloyeeDAO and connection utilities are used together for handling all the database tasks. It is responsible for saving an employee when the database connectivity is handled by Connection Utility.

Registration Demo

This session helps you to access Liferay Portal and run using your login credentials in the Dashboard.

Liferay 11


  1. Expand the dropdown that is beside your name and select My Dashboard from the list.

Liferay 12

  1. The Dashboard allows the user to add, remove, and modify the Portlets. The Plus button allows you to add the portlet.

  2. A new pane has been viewed, and a set of tabs are shown. Drag the Portlets into the dashboard.

  3. When you try to submit an empty form, an error message will notify you of what went wrong and the involvement requirements.

  4. So, fill in the required details and try to register.

  5. And finally, you can see the employee registered inside the database.


By concluding, Liferay has tools used in three environments, such as the command-line environment, which integrates with different tools, Easy-to-use Liferay IDE that reduces the learning curves, and Maven environment is an adopted project management system. In this tutorial, we have learned the basic understanding of Liferay, how to create Liferay Plugin Portlets and Projects, and the benefits of using Liferay. If you want to achieve in-depth knowledge on Liferay, check out our Liferay Training curriculum without further delay.


Course Schedule
Liferay TrainingJul 20 to Aug 04View Details
Liferay TrainingJul 23 to Aug 07View Details
Liferay TrainingJul 27 to Aug 11View Details
Liferay TrainingJul 30 to Aug 14View Details
Last updated: 08 Jan 2024
About Author

Keerthana Jonnalagadda working as a Content Writer at Mindmajix Technologies Inc. She writes on emerging IT technology-related topics and likes to share good quality content through her writings. You can reach her through LinkedIn.

read less