In this blog, we have compiled a comprehensive list of Liferay Interview Questions to help you prepare for your next Liferay interview. Whether you are a seasoned Liferay Developer, or administrator, or just beginning your journey with Liferay, these questions cover a wide range of topics and will provide you with valuable insights into the platform.
From fundamental concepts to more advanced topics, these interview questions are designed to test your understanding of Liferay's Architecture, features, customization capabilities, security, performance optimization, and more. By familiarizing yourself with these questions and their answers, you'll gain the confidence and knowledge necessary to excel in your Liferay interview.
So, let's dive into the world of Liferay and explore these insightful interview questions to help you land your dream job or take your career to the next level!
In this article, we will cover the following:
Ans: In general, a web portal represents a web application that provides a single point of access to a variety of information.
The functionality of a portal can be extended very easily by creating custom applications that can run inside a portal. These applications are called portlets.
For running portlets, you need an application server that can run a portlet container spec (JSR168 or JSR286). There are dozens of free and enterprise portal products available.
Liferay portal is an open-source portal and below are the benefits of using Liferay portal:
Ans: Liferay portal comes with different portlets by default. These portlets are nothing but different small applications running in the instance (portal). Portlets are pluggable software components that are managed in a web portal.
In general words, you can call them as different catalogs as portlets produce fragments of markup code that are aggregated into a portal. So a portal page is displayed as a collection of the portlet, these multiple small applications together making a page of the site and these all pages together makes one community or enterprise portal. Hence a portlet (or collection of portlets) resembles a web-based application that is hosted in a portal.
A portlet is a small application to fulfill the requirement of a certain domain. Inter portlet communication is supported under the Liferay portal. Portlet supports the hot deployment feature of Liferay Portal.
Q3) What is the Liferay portal and how it differs from other portals IBM WCM, Web logic?
Ans:
Inclined to build a profession as Liferay Developer? Then here is the blog post on, exploring Liferay Training |
Ans: JSR – 286
Ans: init(),render(),processAction(),processEvent(),serveResource(),destroy()
Ans: GenericPortet
Ans: LiferayPortlet -> GenericPortlet
Ans: A Portlet container is built on top Servlet container.
Ans:
Hook:
The hook is a feature to catch hold of the properties and JSP files into an instance of the portal as if catching them with a hook. Hook plugins are more powerful plugins that come to complement portlets, themes, layout templates, and web modules. A hook plugin is always combined with a portlet plugin. For instance, the portlet social-portlet is a portlet plugin for Social Office with hooks. In general, hooks would be very helpful tools to customize the portal without touching the code part of the portal. In addition, you would use hooks to provide patches for the portal systems or social office products.
Source:
Liferay Portal 6 Enterprise Intranets
EXT:
EXT is used to customize and extend the Liferay portal. EXT builds a new ROOT web app and replaces it with a huge build mechanism on your existing Liferay portal.
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.
Ans: View mode is what has displayed a user logs in to the Liferay portal and various portlets are displayed to him.
Edit mode is the configuration options that are displayed when the edit button is clicked on the portlet.
Ans: service.xml is a configuration file that consists of the details for database entities that are used in a portlet. The service builder uses the service.xml to generate the DAO/DTO classes for a portlet.
service.xml is also used by the Liferay server to create the database tables and columns for entities mentioned in service.xml.
Ans: Yes it is possible to convert the legacy application into a portlet by making the legacy application follow the requirements of a Liferay plugin and then deploying the same on the Liferay server.
Ans: Liferay website itself lists the steps for upgrading from 5.2.3 to Liferay 6. One should be though aware of how to take database backup and how to patch Liferay in general.
Ans: Other vendors have also rolled out portals which are reference implementations of JSR 286. The list includes:
Ans: Following is the portlet lifecycle:
Init(): It mainly initializes the portlet.
Render(): It takes the HTML output to User Interface. It mainly renders the view in terms of JSP/HTML code and shows it into the respective portlet.
Destroy(): This method takes care of releasing the portlet resources.
Ans: Liferay portal ships with the one Liferay portal tomcat bundle which is up and running on any server with certain database settings. We can have more than one Liferay instance running from one database.
Liferay Portal allows you to run more than one portal instance on a single server. The Portal Instances page of the control panel lets you manage these instances. Data for each portal instance are kept separate. All portal data, however, is kept in the same database.
Each portal instance requires its own domain name. Liferay will direct users to the proper portal instance based on this domain name. So before you configure an instance, we need to configure its domain name in our network first. When we are ready to add an instance, click the Instances tab - > Add button.
It will be prompted for four fields and a checkbox:
Ans: At the time of the creation of any site, we need to provide domain names that further take it as a site domain name. We need to provide a certain domain name as required through the control panel of the Liferay portal. A single instance of Liferay Portal supports the hosting of two or more domain names via communities(sites).
When we will go to the control panel -> Site settings -> we can provide the site URL, and details like the site(community) description, membership type, active status, and virtual host.
Ans: Liferay bundled with the Tomcat app server is the best one to start in a clean setup.
Ans: We can customize the Liferay Search feature, depending on our requirements in two ways.
Hook: If changes are required as per the view side like we need to change the search result from view then we can write the Hook to customize it.
EXT: If changes are required as per the core functionality like we need to change the search query term, we can implement EXT.
Ans: We need to set up the below properties in our portal-ext.properties(this is for one instance represented by 1p, same properties we need to add for the second instance also represented by 2p) and some required IP addresses.
#cluster configurations - these settings are for cluster
net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml
dl.store.file.system.root.dir=/webapps/document_library_cluster
#other settings for cluster
liferay.home=/webapps/liferay-1p/liferay-portal-6.1.10-ee-ga1/
lucene.dir=/webapps/liferay-1p/liferay-portal-6.1.10-ee-ga1/data/lucene
cluster.link.enabled=true
lucene.replicate.write=true
multicast.group.address["cluster-link-control"]=239.255.4.1
Ans: These are Liferay tag libs and provide access to the below list of objects in JSP:
Liferay-theme: define object will provide the following variables
Ans:
Ans: Portlet Preferences are properties for storing basic portlet configuration data. Administrators often use preferences to provide a customized view of a portlet to users based on preferences.
Ans:
p_p_lifecyle holds an integer value and represents the portlet lifecycle phase to the portlet belongs:
Ans:
<% String nameSpace= getNamespace() %>
<portlet-namespace/>
You liked the article?
Like: 3
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.