JSP Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission from Liferay, LLC.
Introduction Difficulty Level: Easy The source code for this presentation is located here: source-code-part2
Objectives The goal of this tutorial is to change the Title of our portlet and add it to a Category 1.Set the Title Language-ext.properties 2.Add the portlet to a Category liferay-display.xml
Directory Structure Configuration files are located here: \ext\ext-web\docroot\WEB-INF Property files are located here: \ext\ext-ejb\classes
Language-ext.properties The first step is to change the Title from javax.portlet.title.EXT_2 to JSP Portlet! 1.Go to ext\ext-ejb\classes\content \Language-ext.properties 2.Enter the following in Language- ext.properties: javax.portlet.title.EXT_2=JSP Portlet!
liferay-display.xml Next, let’s add our portlet to the Test Category 1.Go to ext\ext-web\docroot\WEB-INF \liferay-display.xml 2.Enter the following in liferay-display.xml: …
Checkpoint 1.What is happening in the following line? javax.portlet.title.EXT_2=JSP Portlet! 2.What do you think category.test represents? 3.Where are configuration files like liferay- display.xml located? 4.Where are properties files located?
Deploy the Files to Tomcat 1.Click Start Run… 2.Type cmd and press Enter 3.Navigate to C:\Training\liferay\ext 4.Type ant deploy
Final Steps 1.Restart Tomcat: Click on the Tomcat Window Press Ctrl-C Double click startup.bat 2.Open up a new browser and type Login: Password: test
Congratulations! You’ve created your first JSP Portlet! 1.Mapped the title from javax.portlet.title.EXT_2 to JSP Portlet! Language-ext.properties 2.Added our portlet to the Test category liferay-display.xml
Revision History Edward Shin09/17/06Updated for Liferay 4.1.2