• Creating Portlet In Liferay 7 DXP

    Creating Portlet In Liferay 7 DXP

    To Create Portlet in liferay 7 DXP we must have a liferay workspace if we are using gradle as a build tool. If you are using maven as a build you don't need to have a liferay workspace. If you are not familiar on creating liferay workspace please refer my previous post Liferay 7 DXP Setup In Eclipse

    Liferay IDE Milestone 3.0.1 M2
    Liferay CE Portal Tomcat 7 GA3
    JDK 8
    MySql 5.7

    Step 1 : Create Module Project

    After creating a new liferay workspace right click on the liferay workspace created, in my case the workspace name is 'LiferayWorkspace' if you want to create a new portlet click on the 'New Liferay Module Project' option as shown in the below.

    Liferay 7 Create Module Project

    Step 2 : Select Project Template 

    After selecting the above option a new wizard window will be shown for giving the Portlet module details as shown below.

    Liferay 7 Module Project Template

    Give the Project Name, select build type as grade and project template as mvc-portlet then click next.

    Step 3 : Provide Component Class Name and Package Name

    Enter the portlet class name and package name then click on finish, a new portlet project will be created in the modules folder of the Liferay Workspace folder.

    Liferay 7 Component Class Name and Package

    Step 4 : Add Portlet Module To Server

    Add the portlet to server using the 'Add and Remove' option. you can build and deploy the portlet module using the Gradle Task Tab available in eclipse as shown below.

    Liferay 7 Add Module to server

    Step 5 : Deploy The Portlet Module Using 'Gradle Tasks

    You can build, deploy and clean the created modules using the 'Gradle Tasks' view in the eclipse as shown in the below image.

    Liferay 7 Deploy Module to server


    1. Nice bro....Very easy go go...

    2. Thanks Mahaboob, please leave your feedbacks and comments below for any improvements and suggestions

    3. Superb... Great Job..Keep it Up..