Liferay Interview Questions and Answers

Liferay is a powerful open-source platform used for building web portals and enterprise applications. In this blog, we are going to cover the top Liferay interview questions and answers asked by recruiters to help you land a job as a Liferay professional. These questions are curated by Mindmajix Experts who train for Liferay training to bring you one step closer to your job. 

Liferay is a widely used and recognized open-source platform. Many top MNCs worldwide rely on Liferay to streamline their business processes. The demand for Liferay pros is skyrocketing with lucrative packages. If you’re the one who is aiming to get a job like Liferay Developer in top companies, then this blog can help you prepare for the interview.

This Liferay Interview Questions blog covers topics on Liferay Scenario, portal, OSGi, DXP, administration, and more to keep you updated with the latest changes. Navigate through them carefully and prepare accordingly to improve your chances of getting hired.

Types of Liferay Interview Questions

Top Liferay Interview Questions and Answers

  1. What is Liferay?
  2. Is Liferay Java-based?
  3. What is service.xml? And how will you use the Liferay service builder?
  4. What is the current version of Liferay?
  5. How will you set up a Liferay DXP on a cluster?
  6. What is OSGi?
  7. How do you manage Liferay portal administration?
  8. What are the features of the Liferay Portal?
  9. Is Liferay a horizontal portal?
  10. Which One Is Best To Start In A Clean Setup?

Basic Liferay Interview Questions

If you are a beginner or fresher in this field and it might be your first job, you can expect the following basic Liferay questions.

1. What is Liferay?

Liferay is a Java-based open-source portal and social platform that complies with JSR 286. It includes 60+ completely functional built-in portlets and many interaction points for simple integration with third-party software such as Alfresco and Sharepoint.

2. For what purpose is Liferay suitable?

Liferay offers many features, including well-written code, a friendly community, and more, making it suitable for a wide range of needs. Also, it’s a portal that thrives as a content-centric platform.

Want to Become an Expert in Liferay? Then visit here to Learn Liferay Course

3. Is Liferay Java-based?

Liferay DXP is a Java-based platform that can be customized by adding new applications, modifying behavior, and creating new themes.

4. Is Liferay a CMS?

Liferay is a robust and versatile content management system (CMS) that allows you to make significant changes to how you do business. It is one of the most widely used content management systems (CMS) for managing and maintaining websites, and many industry experts highly recommend it.

5. What is Tomcat Liferay?

One folder above Tomcat's install location is Liferay Home. The installation location of your Tomcat server will be referred to as $TOMCAT HOME. Download a Liferay/Tomcat bundle from the Help Center if you already have a Tomcat server.

6. What are the new features available in Liferay 7?

The list of new features are as follows:

  • OSGI AND MODULARITY. 
  • TOOLING. Liferay is very flexible when it comes to supporting different development tooling.
  • Internationalization
  • WYSIWYG Editors
  • Themes generator
  • Application Display Templates Support for Login, Language, and Breadcrumb portlets.
  • ElasticSearch
  • Java 8 Support.

7. What is service.xml? And how will you use the Liferay service builder?

A service.xml is a configuration file that contains information about database entities used in a portlet. The DAO/DTO classes for a portlet generate the service builder using the service.xml file. The Liferay server builder also uses service.xml to construct database tables and columns for the entities listed in service.xml.

8. What are the differences between Portlet and Servlet?

The web component’s Servlet and Portlet generate content for user requests. Both utilize a variety of situations. By contrasting the qualities of Servlet vs. Portlet, below are some differences between portlet and servlet.

Portlet Servlet

Portlet responds to user requests using various methods such as render, process action, serveResource, processEvent, etc.The service method is the only way for a servlet to respond to a user's request.
A distinct object called Portlet Request / Portlet Response will be accessible to the Portlet.The Servlet Request and Servlet Response objects can be accessed directly by the Servlet.

9. What is a module in Liferay?

Liferay 7 has shifted to a modular framework, with a module serving as the sole development unit. In a nutshell, a module is a Liferay 7 plugin that consists of a set of classes, each with its MANIFEST file and extra resources, all bundled into a JAR file.

10. How do I create a module in Liferay 7?

Navigate to File --> New --> Liferay Module Project to create a new Liferay module project. 

11. What is the current version of Liferay?

Liferay CE 6.2 GA1 (6.2. 0) or Liferay EE 6.1 GA2 is the latest version. 

12. What are the different module types supported in Liferay 7?

  • Gradle (by default)
  • Maven
  • Ant / Ivy.
Related Article: Liferay Tutorial

13. What is Liferay integration?

Liferay DXP is a comprehensive software foundation that bridges the gap between old and new, allowing complicated processes to be more accessible to their consumers. 

14. What is the life cycle of a portlet?

  • Init: The portlet container calls the init method during deployment and reads the init parameters defined in the portlet.xml file.
  • Render: The portlet generates the content and renders it on the webpage during this step.
  • Action:  In this phase, user activities such as adding, modifying, and affecting the move.
  • Destroy: It happens when a portlet gets removed from a portlet container.

Liferay Scenario-Based Interview Questions

This section contains questions of Liferay scenario-based with answers to help you crack your interview.

15. Is it possible to set a session timeout for a portlet in the Liferay portal?

It’s not possible to set a session timeout for a portlet in the Liferay portal.

MindMajix YouTube Channel

16. How will you build a portlet that can be added only single or multiple times into the portal application?

Every portlet application's instantiable flag is set to true in Liferay-portlet.xml, located in the WEB-INF directory. If this flag sets to false, a portlet is added once on the portal page.

17. If the service builder can build WSDL, What is the use?

The portlet can deploy as a web service using ANT's build WSDL target. Remote Portals are referred to as web services in JSR 286. You may find instructions for creating a web service portlet.  

18. Can JDK be installed without JRE?

 Yes, you can install JDK without JRE.

19. How will you set up a Liferay DXP on a cluster?

You can set up a Liferay DXP on a cluster in the following way:

  • All nodes should share the Liferay DXP database or database cluster.
  • Must configure documents and media repositories in the same way and be accessible to all cluster nodes.
  • Should perform a search on a separate search server that can cluster if necessary.
  • Enable Cluster Link for the cache to replicate across all cluster nodes.
  • Individually deploy applications to each node.

20. There is a portlet application for managing images. Suppose the user wants to see the pictures on full screen. Will Liferay allow you to do that?

By adding the full-screen option,  Liferay enables any portlet to manage images.

21. What is the purpose of portal-ext  Properties?

Portal-ext. Property is a file that contains several configurable options. These options can be changed or expanded in portal-ext. Properties, for instance, there is no section for database pool.

22. Do you know how to update your setup of Liferay 5.2.3 to Liferay 6?

The methods for upgrading from Liferay 5.2.3 to Liferay 6 lists on the Liferay website. However, one should be aware of how to back up a database and patch Liferay in general.

23. Explain the hot deployment feature of Liferay? 

The ability to deploy and re-deploy Liferay portlets without restarting the Liferay server is known as "hot deployment." The deploy target of Liferay's ANT build script or the Eclipse plugin, which utilizes this ANT script internally, can be used for hot deployment.

Liferay OSGi Interview Questions

Liferay uses the OSGi framework to offer a modular application development environment. To provide a platform that is simple to develop, Liferay DXP employs several OSGi best practices. Below we’ve listed oft-asked Liferay OSGi interview questions for your preparation.

24. What is OSGi?

OSGi (Open Service Gateway Initiative) is a Java platform for creating and distributing modular software. OSGi has two sections. 

  • The first section of OSGi is a standard for modular components known as bundles, often known as plug-ins. 
  • The second section of OSGi is a service registry at the Java Virtual Machine (JVM) level, which bundles can utilize to publish, discover, and bind to services in a service-oriented architecture (SOA).

25. What is the benefit of OSGi?

Listed are a few benefits of the OSGi framework: 

  • Applications are more adaptive to changing requirements, more portable, and easier to re-engineer.
  • The framework delivers the Spring Framework's declarative assembly and simplified unit testing in a standardized version given as part of the application server runtime rather than a third-party library installed as part of the application.
  • The framework is compatible with the Java EE programming model, allowing you to deploy a web application as a collection of versioned OSGi bundles with a dynamic lifespan.

26. What is an OSGi container in Liferay?

OSGi makes it easy to create and manage modular Java components (known as bundles) deployed in containers. You create one or more bundles using the OSGi specification and tools. Components, Services, Bundles, and Modules are all managed by OSGI Container.

27. What is OSGi dependency?

MOTECH modules are all run in a Felix OSGi framework instance contained in the platform war. As a result, all of the libraries you need in your module get packed as OSGi bundles. Because all that is (theoretically) required to make a library OSGi-ready is to add a few entries to the META-INF/MANIFEST file. Many major Java libraries are OSGi enabled by default, according to MF.

28. What is a bundle in OSGi?

A bundle is a JAR file that contains resources in OSGi. It comprises a manifest file that describes the JAR file's contents and provides information to the end users. 

29. What is the difference between jar and OSGi bundle?

There's not much of a distinction. The formats are identical; a JAR is a bundle, and a bundle is a JAR. On the other hand, a usable bundle must include OSGi metadata in its manifest so that an OSGi framework can manage class visibility across the bundle.

30. How does the OSGi bundle work?

OSGi is a collection of Java-specific requirements for a dynamic component system. These specs allow for a development methodology in which an application has numerous components bundled together. Locally and via the network, these components communicate by services.

31. How does the OSGi framework work?

OSGi defines a dynamic module system for JavaTM. OSGi applications deployed to WebSphere® Application Server use an Enterprise Java profile included in the server runtime environment. This environment also contains the OSGi framework to run OSGi applications.

Liferay Administration Interview Questions

If you're planning to attend a Liferay Administration interview, here are some questions and answers that you need to consider.

32. How do you manage Liferay portal administration?

The control panel acts as a user interface for creating and maintaining:

  • Plugin Configuration
  • Custom Fields
  • Portal settings 
  • Password policies
  • Roles
  • Page Templates
  • Site Templates
  • Sites and Teams
  • Users and Organization

33. What are the differences between IFrame and Web Proxy?

Web Proxy renders a chunk of HTML into a portal page, and IFrame is more like a doorway to another application.

  •  The user is logged out of the portal when they visit a link in the integrated IFrame application. With IFrames, the end user's browser must have direct access to the embedded application; however, links provided via the Web Proxy portlet are automatically rewritten, so the user is not moved out of the portal context. 
  • Web Proxy allows programs to be accessed through a firewall or other proxies that the end user's browser would not otherwise be able to reach.

34. What is Organization, and how do you assign users to the organization?

  • Organizations are collections of users arranged in a hierarchical order. Users can belong to one or more of them, depending on their position in the hierarchy. Users that belong to the same group might also join an organization.
  • Sites get linked to an organization.

To add Organization

  • To get to the control panel, go to the control panel.
  • Select the Users and Organizations link under the Portal header.
  • Select Add -> Regular Organization from the drop-down menu.
  • Select nothing under the Parent Organization option if the organization is a top-level organization. Save the file.

35. What are structures and templates?

  • Structures allow users to see what material should enter to have a complete article and offer dynamic data to templates.
  • Templates specify displayed contents.

36. What are page types available?

There are two types of pages: site-level and user-level pages.

  • Site Pages: A Site's public pages are those that any user can visit, regardless of whether or not that person is a member of the Site, whereas private pages are those that Site members or Super administrators may only access.
  • User Pages: Anyone can access a user's public pages but only can access their private pages.

37. What is the difference between an organization and a site?

Sites are organized hierarchically in the same way that organizations can. Sites manage pages, content, application data, and users (through site memberships), whereas organizations merely group users.

38. What is a Location organization?

n Organization is a hierarchical grouping of Liferay Users. For example, one of your company's departments (such as Human Resources) could be a Liferay organization. Organizations frequently have their websites.

39. What is a site template?

The Control Panel allows you to manage your site templates. They enable portal administrators to construct several sites with the same set of pages and content as the default. 

40. What is a page template?

Page Templates help you efficiently create pages based on predefined layouts and content. You may also start your Content Page Templates and Widget Page Templates.

41. What is DL (Document Library) in Liferay?

The Documents and Media library in Liferay DXP allows you to store files online as you do locally. It may hold any sort of file and mount and browse external repositories, and function as a virtual shared drive.

Liferay Portal Interview Questions

In this section, let’s see questions and answers based on the Liferay portal for both freshers and experienced.

42. What is  Liferay Portal?

Liferay portal is a free and open-source enterprise platform written in Java and distributed under the GNUlesser general public license and optional commercial license.

43. What is a Web portal?

A Portal application is a web application in the central point which brings all the information together from diverse sources in a uniform way and may contain all collections of web content, and other resources like files, images, documents, Web Pages, and websites.

44. What are the features of the Liferay Portal?

The list of  Liferay portal features are:

  • Portlet Sandboxing
  • Sample UI Development
  • Single-Click Configuration
  • Workflow and Framework
  • Rules Engine Integration
  • Auditing and Performance Monitoring
  • User Personalization
  • Cloud support
  • Role-based content Delivery
  • Custom Fields
  • Mobile Provisioning
  • Search and tagging

45. What is the use of the Liferay Portal?

The benefits of using Liferay Portal for your website are simple: 

  • It includes all of the standard applications you'll need to run your area, as well as an easy-to-use development framework for new applications or customization;
  •  It provides a robust platform for serving your site to all clients, be they desktop, mobile, or anything in between;
  •  It includes all of the standard applications you'll need to run your area, and it contains an easy-to-use development framework for new applications or customization.

46. How many types of roles exist in the Liferay portal, What are they?

There are four different types of roles, which are as follows:

  • Regular role:  Permissions are set up at the portal level and applied there as well.
  • Site role: Permissions are set at the portal level and applied to a single site.
  • Organization role:  Permissions get assigned to one specific organization at the portal level.
  • Team: Permissions are specified and assigned inside a particular site.

47. How does the Liferay portal differ from other portals like IBM WCM, and Web logic?

The Liferay Portal platform is a collection of standard web application development tools. It’s a site-building framework that includes a lot of customizable components. The Liferay Portal application package includes:

  • Calendars
  • Blogs
  • Wikis
  • Workflow
  • Managing Users

48. What are the different phases of the portlet lifecycle?

The Portlet lifecycle has the following phases:

  • Initialization
  • Process access
  • Process event
  • Resource serving
  • Render
  • Destroy

49. How Can You Customize Liferay Search Features? What Are The APIs To Do It?

Liferay Search can be customized in two different ways, depending on our needs.

  • Hook: The Hook personalizes the view side if modifications are necessary, such as modifying the search result from the view.
  • EXT: We can change the basic functionality, such as changing the search query term.

50. What is the difference between the view and edit modes of a portlet?

  • When a user logs into the Liferay portal, it represents various portlets in view mode.
  • When the edit button is on the portlet, the edit mode configuration choices appear.

51. How To Setup A Liferay Cluster From Scratch?

Follow these five steps to set up a Liferay Cluster:

  • The Liferay DXP database or database cluster should be accessible from all nodes.
  • All nodes in the Cluster must be able to access the same Documents and Media repositories.
  • Cluster Link must be turned on for the cache to replicate across all cluster nodes.
  • Individually deploy apps to each node in real time.

52. What is the use of the Portlet Preferences in Liferay?

Portlet Preferences are properties that help to store basic portlet configuration information. Administrators frequently use preferences to give users a customized view of a portlet.

53. In the Portlet URL, what is p_p_lifecycle?

The integer value p_p_ life cycle represents the portlet lifecycle phase to which the portlet belongs:

  • 0 indicates the render phase
  • 1 shows the action phase
  • 2 shows the server resource phase.

54. How do you access Liferay Portal?

To access Liferay Portal, follow the steps:

  • Go to http://localhost:8080 in your browser.
  • To sign in, go to the Sign In link. Note. If you're using a Liferay DXP bundle, you could prompt to use the Setup Wizard. To configure your Admin user, follow the on-screen instructions.
  • To log in, use the default admin credentials. test@liferay.com is the email address. 

Liferay DXP Interview Questions

This section covers questions on Liferay DXP from basic to advanced.

55. What is new in Liferay DXP?

  • Headless APIs — On the latest version of the Liferay DXP
  • RESTful web services are now available. 
  • Multi-factor Authentication (MFA) — Support for FIDO2 devices has been added to Multi-factor Authentication (MFA), allowing users to authenticate to online services on mobile and desktop platforms effortlessly.

56. What is DXP in Liferay?

The Digital Experience Platform (DXP) is a new type of enterprise software that aims to address the needs of businesses undertaking a digital transformation to improve customer experiences.

57. What does Liferay DXP do?

Companies can use DXPs to digitize corporate operations, create connected customer experiences, and collect actionable customer insight.

58. State the differences between Liferay Module and Liferay Plugin?

Listed are a few differences between Liferay Module and Liferay Plugin:

Liferay Module Liferay Plugin

Liferay Modules are OSGi bundles packed as JAR files.WAR files help to bundle Liferay Plugins as web apps.
All of the problems associated with classloader issues get avoided.More Class loaded issues are visible.
There is no class definition found. The runtime will eliminate errors.In the runtime, we regularly see No Class Definition Found; Class Not Found problems.
Portlet Modules and Hook Modules are two types of Liferay Modules.Portlets, themes, text, layout, and hooks are all examples of Liferay plugins.
Once the module gets deployed, it is available in the Liferay Portal Server Bundle directory within the OSGi directory.In the Liferay Portal Server web apps directory, you can find all Liferay Plugins.
Liferay Modules include a variety of tools such as Liferay IDE, Liferay Studio, and BLADE CLI.Liferay Plugins include programs like Liferay IDE and Liferay Studio.

59. What is the difference between DXP and CMS?

A content management system is the (CMS) back of digital bone identity, strategy, and engagement software. A DXP is a collection of tools that enable the creation of personalized experiences that scale and connect across channels, locations, and languages. 

60. What is the MVC portlet in Liferay?

MVC Portlet applications are web modules with at least one portlet class registered as a component in Liferay's runtime environment. Web modules employ standard OSGi metadata to identify themselves and build in any environment.

61. Is Liferay a horizontal portal?

Liferay has been a long-time member of the MQ for Horizontal Portals.

62. What is portlet mode in Liferay DXP? And mention its types.

The function that a portlet performs indicates it is a portlet mode. Depending on the process, portlets typically execute different activities and generate specific content. The portlet container gives the portlet the current portlet mode when invoked.

A few of the Liferay DXP Portlet modes are:

  • View Mode
  • Help Mode
  • Help Mode

Liferay Interview Questions for Experienced

If you're an experienced professional in this field and wish to advance in your career, here are some Liferay interview questions to prepare.

63. What Is Portal-ext properties File? How Can This Be Configured And Used In Liferay?

The Liferay Portal includes default configurations in portal. Property information. You can override the characteristics in the doorway.properties file using the entryway ext. Properties file and provide a clean way to retain your reproduction of designs that may be used beyond the entranceway while also making it simple to update the doorway.

64. What Is Inter-portlet Communication? Why Is It Required To Use JSR Style Inter-portlet Communication?

We occasionally need to establish a connection between two portlets. For example, when an action is performing one portlet, the end-user will send it to another portlet where an outcome is displayed based on the activity performed in the first portlet. It is possible to claim that it is a stab at the striker-catcher instrument.JSR style encrypts portlet communication, ensuring that your portlets are working on another JSR-compliant entrance server. 

65. How Can I Configure Two Different Domain Names (for example, First.example.com And Second.example.com) On Liferay?

We must give area names at site formation, which it accepts as the site space’s name. Through the Liferay entrance control board, we must offer the exact space name that is required. A single Liferay Portal example (sites) demonstrates the facilitation of at least two space names using communities shown by a single Liferay Portal example (spots). We can supply the site URL and nuances like the site(community) depiction, participation kind, active status, and virtual host when we go to the control board – > Site settings – >.

66. How Can I Configure Liferay To Use Email Address As User Name Instead Of Screen Name?

Control board – > gateway settings – > Authentication – > LDAP – > LDAP – > LDAP – > LDAP – > LDAP – > LDAP – > LDAP – > LDAP 

When LDAP confirms, we must provide the appropriate LDAP mappings, which effectively examine all of the details identified with clients and user groups from the LDAP catalog and import them into the Liferay entry. 

67. How To Customize The Behavior Of Liferay Default Out Of The Box Portlets (for example, Record View, Calendar, Blog, Wiki Etc)?

Hooks help to customize JSPs or UIs if they are required. The Liferay entry package now includes all of the default worked-in portlets. If any customization of the center-level classes is required, EXT is typically employed.

68. Which One Is Best To Start In A Clean Setup?

The Liferay pack with the Tomcat application server is the ideal place to start for a clean setup.

Final Thoughts

Since you've got the most updated Liferay interview questions, you can start preparing for your following interview processes. Analyze the questions above to the real advantage to learn and comprehend solutions to land a fantastic job.

Course Schedule
NameDates
Liferay TrainingNov 02 to Nov 17View Details
Liferay TrainingNov 05 to Nov 20View Details
Liferay TrainingNov 09 to Nov 24View Details
Liferay TrainingNov 12 to Nov 27View Details
Last updated: 06 Jun 2023
About Author

Vinod Kasipuri is a seasoned expert in data analytics, holding a master's degree in the field. With a passion for sharing knowledge, he leverages his extensive expertise to craft enlightening articles. Vinod's insightful writings empower readers to delve into the world of data analytics, demystifying complex concepts and offering valuable insights. Through his articles, he invites users to embark on a journey of discovery, equipping them with the skills and knowledge to excel in the realm of data analysis. Reach Vinod at LinkedIn.

read less