Transcript Slide 1
JSP Portlet Copyright © 2000-2006 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 Languageext.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: <category name="category.test"> <portlet id=“47” /> … <portlet id="EXT_1" /> <portlet id="EXT_2" /> </category> 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 liferaydisplay.xml located? 4. Where are properties files located? Deploy the Files to Tomcat 1. 2. 3. 4. Click Start Run… Type cmd and press Enter Navigate to C:\Training\liferay\ext 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 http://localhost:8080 Login: [email protected] 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 Shin 09/17/06 Updated for Liferay 4.1.2