WA1371 WebSphere Portal 5.1 Programming Using JSR 168
Training and Courseware
WebSphere Portal server is a way to host many web based applications in a central location. Users need to
login only once and use all applications in a consistent manner. Customers and business partners can access
the portal site and make use of all applications running in the portal.
This three day training class teaches students the WebSphere Portal development JSR 168 API. It also covers
Struts and JavaServer Faces based portal site development. All labs are done using Rational Application
Developer (RAD) v6.
Objectives
At the end of this course, students will be able to:
Install and use the latest Portal Toolkit
Understand the motivation behind portals.
Understand the JSR 168 programming model.
Use the Rational Application Developer (RAD) v6 based Portal ToolKit to build portal applications.
Develop portlets using Struts and JavaServer Faces (JSF).
Topics
Introduction to WebSphere Portal, key concepts and benefits.
Portal programming model.
Detail coverage of the JSR 168 API
Introduction to Portal Toolkit.
Struts based portlet development.
JavaServer Faces (JSF) based portlet development.
Audience
Programmers who will be developing applications for WebSphere Portal Server.
Prerequisites
Students should have intermediate knowledge of Java development using WebSphere Studio Application
Developer. Knowledge of Servlet and JSP is strongly recommended.
Duration
Three days.
WA1371 WebSphere Portal 5.1 Programming Using JSR 168
Training and Courseware Course Outline
1. Introduction to the WebSphere Portal Server
Topics
What Is a Portal?
An Example of WebSphere Portal Sites
Benefits of Portal Sites
General Portal Architecture
The Major Components of Horizontal Portals
The Major Components of Horizontal Portals cont
WebSphere Portal Goals
WebSphere Portal Components
WebSphere Portal Components cont
WebSphere Portal Components cont
WebSphere Portal Accessibility
WebSphere Portal Packaging
WebSphere Portal Express
WebSphere Portal Enable
A Typical Network Architecture for WebSphere Portal
WebSphere Business Integration Server Foundation 5.1.1
WebSphere Portal Server
WebSphere Portal Server Architecture
Portal Container
Portal Engine Architecture
Page Aggregation Modules
Portlet
WebSphere Portal Built-In Portlets
Portlet Application
Portlet Mode and State
WebSphere Portlet Content Publishing (WPCP)
Portal Document Manager (PDM)
Search Engine
WebSphere Portal Information
Summary
2. Introduction to JSR 168 Based Portal Programming
Topics
What is JSR 168?
Other API Alternatives
Relationship to J2EE
Relationship to Servlets
A Portal Site
The Portlet
Portlet Application
The portlet.xml File
Portlet Container
Summary
3. Portlet Development Using RAD v6
Objectives
The WebSphere Family
Eclipse Platform
The WebSphere Studio Product Family
Rational Web Developer
Rational Application Developer
Key Features in RAD v6.0
WebSphere Studio Application Developer Integration Edition
WebSphere Studio Enterprise Developer
Views, Perspective, and Editor Areas
Basic Operations with RAD Views and Perspectives
The Java Perspective
The Debug Perspective
Navigator View
Package Explorer
Outline View
Task View
Build and Validation
Import and Export Project
Templates and Code Completion
Searching
Setup Compiler Class Path
JRE Switching
Portal Development Support
RAD 6 Installation
Portal Server v5.1 Test Runtime Installation
Configure Portal Server Test Runtime
Basic Steps in Development
Project Structure
Portlet Project
Create a Project Structure
Working with the Project
portlet.xml Editor
Creating a Test Server
Managing the Server
Unit Testing
Export Portlet Application
4. Basic Portal Programming
Design Pattern of Portlet Applications: Model-View-Controller
More on MVC
The Portlet Interface
The Hello World Portlet
Portlet Lifecycle: Initialization
Portlet Lifecycle: Request Handling
Two Phase Request Processing
The render Method
The PortletRequest Interface
The PortletResponse Interface
The RenderResponse Interface
PortletURL
Example
The processAction Method
The ActionRequest Interface
The ActionResponse Interface
Example
More on Render Parameter
The GenericPortlet Class
User Session Management
Example
End of Portlet Life
Portlet Configuration
Portlet Initialization Parameter
Portlet Context
Interacting with JSP
State Management
Better View State Management
Portlet Preferences
Example: Reading Preferences
Updating Portlet Preferences
Example: Updating Preference
Validating Preference Update
Example Validation
5. Display Generation
Techniques in View Development
JSP Custom Tags
Available Portal Custom Tags
JSR 168 Tags
The defineObjects Tag
More on defineObjects
The actionURL Tag
The param Tag
The namespace Tag
National Language Support
Dynamic Translation
Resource Bundle File
Displaying Translated Text
More on JSTL Internationalization Tags
Example of Using Resource Bundles
Static Translation
Portlet Resource Bundle
Providing Locale-Specific Preference Defaults
6. Advanced Programming
Portlet Caching
Enabling Servlet Caching
Programmatically Control Cache
Accessing User Information
Steps to Access User Information
Access User Information From Portlet
Portlet Services
Writing a Portlet Service
Defining the Portlet Service Interface
Example: AccountService
Writing the Portlet Service Implementation
java.util.prefs.Preferences
Example: AccountServiceImpl
Example Continued: AccountServiceImpl
Example Continued: AccountServiceImpl
Registering Portlet Services
Example: PortletServiceRegistryService.properties
Using a Service from a Portlet
Example
Content Access Service
7. Credential Vault
Credential Vault
Credential
Components of Credential Vault
Structure of the Credential Vault
Slot
Slot Scope
Credential Access Level
Single Sign-On Scenario
CredentialSlotConfig
Methods of CredentialSlotConfig
CredentialVaultService
CredentialVaultService Interface Methods
Methods of the CredentialVaultService -cont
Methods of the CredentialVaultService -cont
Example: Looking Up CredentialVaultService
Example: Create a Slot
Saving Credential in a Slot
Credential Class
Classes That Implement the Credential Interface
Example: Retrieve the Credential
PassiveCredential
UserPasswordPassiveCredential
ActiveCredential
ActiveCredential - cont
HttpFormBasedAuthCredential
HttpFormBasedAuthCredential - cont
Example: Using HttpFormBasedAuthCredential
Example: Using HttpFormBasedAuthCredential
8. Cooperative Portlets
Cooperative Portlets
Example Use Case
Distinguishing an Action
Data Source and Destination Location
Steps To Set Up Cooperation
Understanding the WSDL
A Simple Source WSDL
A Simple Source JSP
A Simple Target WSDL
Processing the Message in the Target
Wiring the Source and Target
Publishing Data from a Target
Creating Cooperative Portlets in RAD
9. Struts and JSF Portlet Development
Introduction to Struts
Why Use Struts To Write Portlets?
Struts and Portlet API Mismatch
Customizing Struts
Portal Struts Processor Class
The Struts Portlet
Struts Portlet Framework
Struts Portlet Framework Details
Generating Portlet URL
The Response Object
Action Processing
Display Rendering
Getting the Portlet Objects
Struts Logging
Creating a Struts Portlet Project
JavaServer Faces (JSF) Basics
Defining the Screen Layout
Managed Bean
Assigning the Model
HTTP Request Handling
Navigation
Advantages of JSF
Creating a JSF Portlet
Creating a JSF Portlet, Continued
Navigation State Management
Advanced: Obtaining Core Objects
10. Using AJAX in a Portlet
What is AJAX?
A Simple Example
The Old Way
The AJAX Way
Two Key Aspects of AJAX
What are the Advantages of the AJAX Approach?
AJAX Technologies
The Basic AJAX API
Creating the XMLHttpRequest Object
The XMLHttpRequest Object Basics
Complete Example
The Timeline
Using AJAX from a Portlet
Handling AJAX Requests
Making an AJAX Request
Where to Go From Here?
11. Portal Development Best Practices
Topics
Architecture Best Practices
Controller (Portlet) Guidelines
View (JSP) Guidelines
Configuration Management
Session Management
Inter Portlet Communication
Security Guidelines
Performance Tips
Performance Testing Guidelines
Summary