Category: Liferay Development

create render URL By Java API in Portlet class and JSP

Liferay provides PortletURLFactoryUtil class to create render URL in portlet. such render URL can point to other portelt thay may be placed on different page. Render URL can be created with Java API. Situations arises when you need to create render URL in portlet. For example you want to make a call to portlet B from portlet A.…

Introduction to Portlet Phases and Lifecycle Methods

Portlet performs unique operation in each lifecycle execution. These lifecycles are known as portlet phases. Each portlet phase / lifecycle is represented by respective methods in portlet class. In Servlet, the servlet container calls service() method to process user request. Portlets are design to place together with other portlets on same page(to generate complete web page), it’s possible that user may not directly interacting…

Initialization phase of Portlet is represented by init() method. When portlet is deployed, portlet container will destroy any existing instance and create new instance of portlet. At this time, it will call init() method. Like Servlet, Portlet can initialize any back end resource or to do any one time activity in init() method. In short init() method is…

portlet lifecycle method render is responsible for generating portlet content. it’s called when portlet is executed in render phase Portlet lifecycle method render method represents render phase of Portlet. During render phase, portlet generates the content based on its current state(Normal, Minimize, Maximize). Render method /phase of all the portlets on same page is called every time when …

Servlet vs Portlet

Servlet vs Portlet is curious topic for Java developers to know in details. Servlet and Portlet are web component used to generate content for user request. They are used in different context. It’s easy to understand the functionality of portlet and servlet by comparing characteristics of Servlet vs Portlet Almost all Java developer are familiar with Servlet. There are many…

How to Import / Configure Liferay Source in Eclipse

Liferay is open source portal. Its source is freely available.Sometimes we need to refer of liferay source during development. Its convenient if we can configure Liferay source in eclipse. In this article, we will see how to import / configure Liferay source in Eclipse (or Liferay Developer Studio). This is very useful when, You need to…

Portal Properties and Portal-ext Properties in Liferay

Portal properties are configuration points from where we can change behavior / functionality of liferay portal. Liferay provides many portal properties which can be used to set up & configure Liferay portal. When we configure liferay server first time, it will create portal-setup-wizard.properties file under <<Liferay-tomcat-bundle>> folder as per below screenshot. This file contains following…

Liferay App : Set Max Char Content

Liferay App : Set Max Char Content . This app provides facility to define max allowed character for structure element during web content creation. In most of the cases, web contents are created with the help of structure and template. To know more about Web contents in Liferay, please refer following blogs. Creating Web content…

call service from one portlet to another portlet in liferay

Liferay service can be created by service builder. we can share liferay service across multiple plugins by sharing service jar file in global class path.   Before understanding how to share liferay service, you may like to understand how to create service builder in liferay, we have seen how we can create service and persistence layer…