Liferay setup and Sample Portlet Tutorial

This Tutorial is intended for users for Liferay version 6 setup and portlet tutorial. Liferay is open source platform and portal technology build on top of Java. This tutorial is intended for Java Developers who to get  start with  Liferay and will know steps on liferay development along with sample portlet:”Hello World portlet”.

Liferay 6.2 Installations:

Liferay Setup:

 

  1.  Create MySQL database : create database lportal character set utf8;
  2.  Download Liferay studio from liferay.com and extract the bundle into your local directory.
  3. Open Developer Studio and you will get the below  screen. (Don’t get confused the Developer Studio is new tool. It is just Eclipse that pre-configured with Liferay plugins and features. You can also download Liferay plugins and add to native eclipse.

    launch_screen
    Liferay setup and portlet tutorial
  4. Click on Next and Proceed and now you need to add developer license. Liferay provides you 3 kind of licenses. Add license and click on Next
    • Liferay Trail License : 30 days of expiry period with 10 concurrent connections
    • Cluster License: Production and Pre Production Licenses
    • Developer License : Developer license with 1 year expiry period
Liferay setup and portlet tutorial
Liferay setup and portlet tutorial

 

6. Select MySQL from JDBC Template and modify Database name if it is different from “lportal” and click on next.

 

DatabaseConfigDBConfig_setup

7. Finally you got home screen Now add mysql java connection in liferay-developer-studio\liferay-portal-6.2-ee-sp5\tomcat-7.0.42\lib\ext folder and start the tomcat server. It will create required tables and you will be asked to provide setup information. Now open localhost:8080 and complete basic setup.

Liferay Sample Portlet Tutorial

  1. Open Liferay Developer studio. Create new portlet by clicking File->New->Liferay Plugin Project

sp1

2. As shown in below, give project details and select plugin type as portlet

sp2

3. select portlet framework as Liferay MVC.

That’s it.  You have created a simple portlet so easily. Liferay makes you easy and configuring JSP paths and all. so for now, just  forget about Controller,JSP configuration and we will look into that part later tutorial. Now start your  local tomcat server and deploy the project:   Right click on project -> Liferay -> SDK -> Deploy.

 

check your porlet plugin is exists in tomcat->webapps folder.  Now login to liferay, click on (+) icon to add portlet.  you can find portlet under category “sample” or you can search it in box.  Select application and drag on to area.

sp3

 

Finally you can see the portlet now on the page:

sp4

One thought on “Liferay setup and Sample Portlet Tutorial”

Comments are closed.