Copyright © Liferay, Inc.

Slides:



Advertisements
Similar presentations
Struts Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Advertisements

Struts Portlet Adding an Action Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without.
JSF Portlet Backing Beans and UI Components Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in.
IMS Client Installation Procedures 1. Copy the Voic Pro from the shared folder on the Voic Pro server. Go to Start, Run, and \\ or \\
HELP GUIDE NEW USER REGISTRATION (SLIDE 2) TAKING A QUIZ (SLIDE 8) REVIEWING A QUIZ (SLIDE 17) GROUP MEMBERSHIP (SLIDE 26) CREATING QUIZZES (SLIDE 31)
Liferay, SSO and LDAP - Integration Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without.
Introduction to Liferay Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written.
Struts Portlet Database Interaction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without.
Basic Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
JSF Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Themes & Layout Tutorial Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written.
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
© 2011 PLANET TECHNOLOGIES, INC. Augmenting User Profiles with Line of Business Data Patrick Curran, MCT APRIL 28, 2012.
Welcome to the Southeastern Louisiana University’s Online Employment Site Applicant Tutorial!
End User Administration (in context of Liferay CMS) Copyright © 2006 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or.
Understanding the IRS 990n e-Postcard COPYRIGHT 2010 Gold Wing Road Riders Association, Inc. All rights reserved under International and Pan-American Copyright.
Ext Environment Copyright © 2005 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Struts Portlet Redirect Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written.
Another Method to Open WebSpace as a Web Folder Alternative Method for Creating Web Folder in WebSpace, Slide 1Copyright © 2004, Jim Schwab, University.
Ext Environment Copyright © 2005 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Microsoft FrontPage 2003 Illustrated Complete Finalizing a Web Site.
Basic Setup Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
LDAP Authentication Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Content Management System Copyright © 2005 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission.
JSP Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
User Administration Guide Copyright © 2006 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission.
How to use WS_FTP A Step by Step Guide to File Transfer.
Database Connection Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Managing Your Specialty Area Website: A What’s What and How-To Guide.
Basic Portlet Copyright © 2000 – 2007 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Required Tools Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
PHP Form Processing * referenced from
1 /22 Accessing TaxWise Online © 2006, Universal Tax Systems, Inc. All Rights Reserved. Accessing TaxWise Online Objectives –In this chapter you will learn.
Page ADP PearsonAccess Proctor Training. Page Agenda Test Overview Testing Components Proctor Roles and Responsibilities Overview Administering the Test.
Required Tools Copyright © 2005 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission from.
 Overview & Major Changes  Test Administrator View ◦ How to create a session ◦ How to approve students ◦ Practice  Student View ◦ Understand.
Welcome to WebAssign! 1st Day of Class.
FINESSE AGENT DESKTOP TRAINING.
Y.-H. Chen International College Ming-Chuan University Fall, 2004
IUIE Reporting Basics Workshop
CS1010: Intro Workshop.
Creating an Online Test Session
In restaurant online order
Copyright © Liferay, Inc.
Welcome to Employee Self Service
Registration How to Register for Classes
Centro Online Lab Manuals, Workbooks & eBooks
Introduction to Programming the WWW I
Basic hands-on Zoltán Farkas, MTA SZTAKI
Microsoft FrontPage 2003 Illustrated Complete
Welcome to WebAssign!.
Fix AOL error code AC-3100 in AOL Mail Account Contact No:
Password Reset Instructions
Welcome to WebAssign! 1st Day of Class.
Learning to use WebAssign
Welcome to WebAssign! 1st Day of Class.
Welcome to WebAssign! 1st Day of Class.
Welcome to WebAssign! 1st Day of Class.
Welcome to WebAssign! 1st Day of Class.
HOW TO CREATE A CLASS Steps:
Getting Started.
JSF Portlet Message Bundles
Welcome to WebAssign!.
School Net Login via single sign-on
Welcome to WebAssign! 1st Day of Class.
Citizens Ebanking Login Process
Welcome to WebAssign! 1st Day of Class.
Business Zone - Clearing your Cache
Welcome to WebAssign! 1st Day of Class.
Q: How do I view and upload a document?
Presentation transcript:

Copyright © 2000-2006 Liferay, Inc. Basic 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-part1 Make sure to read the code! It’s important to become familiar with the basic structure before the exercises get more complicated.

Objectives The goal of this tutorial is to create a JSP portlet Define the portlet portlet-ext.xml liferay-portlet-ext.xml Create the JSP view.jsp

Directory Structure Configuration files are located here: ext\ext-web\docroot\WEB-INF JSPs are located here: ext\ext-web\docroot\html

Define the Portlet The first step will be to define the portlet in portlet-ext.xml The second step will be to define the portlet in liferay-portlet-ext.xml

portlet-ext.xml <portlet> <portlet-name>EXT_2</portlet-name> <display-name>JSP Portlet Introduction</display-name> <portlet-class>com.liferay.portlet.JSPPortlet</portlet- class> <init-param> <name>view-jsp</name> <value>/portlet/ext/jsp_portlet/view.jsp</value> </init-param> <expiration-cache>0</expiration-cache>

<supports> <mime-type>text/html</mime-type> </supports> <resource- bundle>com.liferay.portlet.StrutsResourceBundle</resou rce-bundle> <security-role-ref> <role-name>power-user</role-name> </security-role-ref> <role-name>user</role-name> </portlet>

Checkpoint What is <portlet-name> used for? What is <portlet-class> used for? What is view-jsp? What is /portlet/ext/jsp_portlet/view.jsp? What is <role-name> used for?

liferay-portlet-ext.xml The second step is to define the portlet in liferay-portlet-ext.xml <portlet> <portlet-name>EXT_2</portlet-name> </portlet>

view.jsp Create the following directory structure: ext\ext-web\docroot\html\portlet\ext\jsp_portlet Create view.jsp ext\ext-web\docroot\html\portlet\ext\jsp_portlet \view.jsp Enter the following in view.jsp JSP Portlet!

Checkpoint Why did we place view.jsp here? ext\ext-web\docroot\html\portlet\ext\jsp_portlet \view.jsp Hint: portlet-ext.xml Where are configuration files like portlet- ext.xml and liferay-portlet-ext.xml located?

Deploy the Files to Tomcat Click Start  Run… Type cmd and press Enter Navigate to C:\Training\liferay\ext Type ant deploy

Checkpoint Verify that your files were deployed to Tomcat correctly. This is a required step! Go to \tomcat\webapps\ROOT\WEB-INF Check portlet-ext.xml and liferay-portlet-ext.xml and make sure they are correct Go to tomcat\webapps\ROOT\html\portlet \ext\jsp_portlet Make sure that view.jsp exists and that it is correct See the Troubleshooting section if your files were not deployed correctly.

Final Steps Restart Tomcat: Click on the Tomcat Window Press Ctrl-C Double click startup.bat Open up a new browser and type http://localhost:8080 Login: test@liferay.com Password: test Click Add Content  Undefined Click javax.portlet.title.EXT_2

Troubleshooting Question: My files are not being deployed to Tomcat correctly! Answer: You have an error in app.server.{user.name}.properties Make sure that app.server.{user.name}.properties is located in C:/Training/liferay/ext Verify that your {user.name} is correct Make sure that app.server.{user.name}.properties contains the following: app.server.type=tomcat app.server.tomcat.dir=C:/Training/liferay/tomcat

Troubleshooting Question: My portlet is not showing up when I click Add Content  Undefined Answer: Your portlet is not defined correctly in portlet-ext.xml or liferay-portlet-ext.xml Check portlet-ext.xml and liferay-portlet-ext.xml in C:/Training/liferay/tomcat/webapps/ROOT/WEB-INF Make sure that the EXT_2 portlet is defined correctly.

Congratulations! You’ve created your first JSP Portlet! Defined the portlet in portlet-ext.xml Defined the portlet in liferay-portlet-ext.xml Created the JSP in ext\ext-web\docroot\html\portlet\ext\jsp_portlet \view.jsp

Revision History Edward Shin 09/14/06 Updated for Liferay 4.1.2