JSP Portlet Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission
Post on 17-Jan-2016
Embed Size (px)
JSP PortletCopyright 2000-2006 Liferay, Inc.All Rights Reserved.No material may be reproduced electronically or in print without written permission from Liferay, LLC.
IntroductionDifficulty Level: EasyThe source code for this presentation is located here: source-code-part2
ObjectivesThe goal of this tutorial is to change the Title of our portlet and add it to a CategorySet the Title Language-ext.propertiesAdd the portlet to a Category liferay-display.xml
Directory StructureConfiguration files are located here: \ext\ext-web\docroot\WEB-INFProperty files are located here: \ext\ext-ejb\classes
Language-ext.propertiesThe first step is to change the Title from javax.portlet.title.EXT_2 to JSP Portlet!Go to ext\ext-ejb\classes\content \Language-ext.propertiesEnter the following in Language-ext.properties: javax.portlet.title.EXT_2=JSP Portlet!
liferay-display.xmlNext, lets add our portlet to the Test CategoryGo to ext\ext-web\docroot\WEB-INF \liferay-display.xmlEnter the following in liferay-display.xml:
CheckpointWhat is happening in the following line? javax.portlet.title.EXT_2=JSP Portlet!What do you think category.test represents?Where are configuration files like liferay-display.xml located?Where are properties files located?
Deploy the Files to TomcatClick Start RunType cmd and press EnterNavigate to C:\Training\liferay\extType ant deploy
Final StepsRestart Tomcat: Click on the Tomcat Window Press Ctrl-C Double click startup.batOpen up a new browser and type http://localhost:8080 Login: email@example.com Password: test
Congratulations!Youve created your first JSP Portlet!Mapped the title from javax.portlet.title.EXT_2 to JSP Portlet! Language-ext.propertiesAdded our portlet to the Test category liferay-display.xml
Revision HistoryEdward Shin09/17/06Updated for Liferay 4.1.2