Skip Headers
Oracle® Application Server Portal Developer's Guide
10
g
Release 2 (10.1.2)
B14134-02
Home
Solution Area
Index
Next
Contents
List of Figures
List of Tables
Title and Copyright Information
Preface
Intended Audience
Documentation Accessibility
Related Documents
Conventions
Browser Recommendations
Part I Portlet Overview
1
Understanding Portlets
1.1
Introduction to Portal Development
1.2
Understanding Portlets
1.3
Portlet Anatomy
1.4
Portlet Resources
1.4.1
Out-of-the-Box Portlets
1.4.2
Other Sources of Pre-Built Portlets
1.4.3
Web Clipping
1.4.4
OmniPortlet
1.4.5
Portlet Builder
1.4.6
Programmatic Portlets
1.4.7
Deciding Which Tool to Use
1.5
Summary
2
Portlet Technologies Matrix
2.1
The Portlet Technologies Matrix
2.2
General Suitability
2.2.1
Web Clipping
2.2.1.1
Examples of portlets you can build using Web Clipping
2.2.2
OmniPortlet
2.2.2.1
Examples of portlets you can create with OmniPortlet
2.2.3
Java Portlets
2.2.3.1
Examples of portlets you can build using Java
2.2.4
Portlet Builder
2.2.4.1
Examples of portlets you can build using the Portlet Builder
2.2.5
PL/SQL Portlets
2.2.5.1
Examples of portlets you can build using PL/SQL
2.3
Expertise Required
2.3.1
Web Clipping
2.3.2
OmniPortlet
2.3.3
Java Portlets
2.3.4
Portlet Builder
2.3.5
PL/SQL Portlets
2.4
Deployment Type
2.4.1
Web Providers
2.4.2
WSRP Producers
2.4.3
Database Providers
2.4.4
Provider Architecture
2.4.5
Provider Registration
2.4.5.1
User/Session Information
2.5
Caching Style
2.5.1
Web Clipping, OmniPortlet, and Portlet Builder
2.5.2
Java Portlets
2.5.3
PL/SQL Portlets
2.6
Development Tool
2.6.1
Web Clipping, OmniPortlet, and Portlet Builder
2.6.2
Java Portlets
2.6.3
PL/SQL Portlets
2.7
Portlet Creation Style
2.7.1
OmniPortlet and Web Clipping
2.7.2
Java Portlets
2.7.3
Portlet Builder
2.7.4
PL/SQL Portlets
2.8
User Interface Flexibility
2.8.1
Web Clipping
2.8.2
OmniPortlet and Portlet Builder
2.8.3
Java Portlets and PL/SQL Portlets
2.9
Ability to Capture Content from Web Sites
2.9.1
Web Clipping
2.9.2
OmniPortlet
2.9.3
Java Portlets
2.9.4
PL/SQL Portlets
2.10
Ability to Render Content Inline
2.10.1
Web Clipping
2.10.2
OmniPortlet
2.10.3
Java Portlets
2.10.4
Portlet Builder
2.10.5
PL/SQL Portlets
2.11
Charting Capability
2.11.1
Web Clipping
2.11.2
OmniPortlet
2.11.3
Java Portlets
2.11.4
Portlet Builder
2.11.5
PL/SQL Portlets
2.12
Public Portlet Parameters Support
2.13
Private Portlet Parameter Support
2.13.1
OmniPortlet, Web Clipping, and Portlet Builder
2.13.2
Java Portlets and PL/SQL Portlets
2.14
Event Support
2.14.1
Web Clipping, OmniPortlet, and Java Portlets
2.14.2
Portlet Builder and PL/SQL Portlets
2.15
Ability to Hide and Show Portlets Based on User Privileges
2.15.1
Web Clipping and OmniPortlet
2.15.2
Java Portlets
2.15.3
Portlet Builder
2.15.4
PL/SQL Portlets
2.16
Multilingual Support
2.16.1
Web Clipping, OmniPortlet, Java Portlets, and PL/SQL Portlets
2.16.2
Portlet Builder
2.17
Pagination Support
2.17.1
Web Clipping
2.17.2
OmniPortlet
2.17.3
Java Portlets and PL/SQL Portlets
2.17.4
Portlet Builder
2.18
Single Sign-On and External Application Integration
2.18.1
Web Clipping
2.18.2
OmniPortlet
2.18.3
Java Portlets
2.18.4
PL/SQL Portlets
2.19
Summary
Part II Creating Portlets
3
Creating Portlets with OmniPortlet
3.1
What is OmniPortlet?
3.2
The OmniPortlet Wizard
3.2.1
Type
3.2.2
Source
3.2.2.1
Proxy Authentication
3.2.2.2
Connection Information
3.2.2.3
Spreadsheet
3.2.2.4
SQL
3.2.2.5
XML
3.2.2.6
Web Service
3.2.2.7
Web Page
3.2.3
Filter
3.2.4
View
3.2.5
Layout
3.2.5.1
Tabular Layout
3.2.5.2
Chart Layout
3.2.5.3
News Layout
3.2.5.4
Bullet Layout
3.2.5.5
Form Layout
3.2.6
Edit Defaults mode
3.2.7
Events
3.3
Parameters and Events
3.3.1
Portlet Parameters and Events
3.3.2
Page Parameters and Events
3.4
Summary
4
Building Example Portlets with OmniPortlet
4.1
Adding an OmniPortlet Instance to a Portal Page
4.2
Building an OmniPortlet Based on a Web Service
4.3
Building an OmniPortlet Based on a Spreadsheet (CSV)
4.4
Building an OmniPortlet Based on an XML Data Source
4.5
Building an OmniPortlet Based on a Web Page Data Source
4.6
Setting Up Portlet Parameters and Events
4.6.1
Configure Portlets to Accept Parameters
4.6.2
Map the Page Parameter to the Portlet Parameters
4.6.3
Configure the Chart Portlet to Use Events
4.6.4
Map the Chart Event to the Page
4.7
Summary
5
Creating Content-Based Portlets with Web Clipping
5.1
What Is Web Clipping?
5.2
Adding Web Page Content to a Portal Page
5.2.1
Adding a Web Clipping Portlet to a Page
5.2.2
Selecting a Section of a Web Page to Display in the Web Clipping Portlet
5.2.3
Setting Web Clipping Portlet Properties
5.3
Integrating Authenticated Web Content Using Single Sign-On
5.4
Adding a Web Clipping That Users Can Personalize
5.4.1
Adding a Web Clipping Portlet to a Personal Page
5.4.2
Selecting a Clipping in OTN
5.4.3
Personalizing a Web Clipping Portlet
5.5
Migrating from URL-Based Portlets
5.5.1
Preparing for Migration
5.5.2
Performing the Migration
5.5.3
Post-Migration Configuration
5.5.4
Maintaining Migrated Portlets
5.5.5
Limitations in Migrating URL-Based Portlets
5.6
Current Limitations for Web Clipping
5.7
Summary
6
Creating Java Portlets
6.1
Guidelines for Creating Java Portlets
6.1.1
Guidelines for Show Modes
6.1.1.1
Shared Screen Mode (View Mode for JPS)
6.1.1.2
Edit Mode (JPS and OracleAS Portal)
6.1.1.3
Edit Defaults Mode (JPS and OracleAS Portal)
6.1.1.4
Preview Mode (JPS and OracleAS Portal)
6.1.1.5
Full Screen Mode (OracleAS Portal)
6.1.1.6
Help Mode (JPS and OracleAS Portal)
6.1.1.7
About Mode (JPS and OracleAS Portal)
6.1.1.8
Link Mode (OracleAS Portal)
6.1.2
Guidelines for Navigation within a Portlet
6.1.2.1
Types of Links for Portlets
6.1.3
Guidelines for Mobile Portlets
6.1.3.1
Declare Capabilities
6.1.3.2
Declare a Short Title
6.1.3.3
Implement Personalization of the Short Title
6.1.3.4
Implement Link Mode
6.1.3.5
Heed Device Information
6.1.3.6
Tailor Personalization Pages
6.2
Introduction to PDK-Java
6.3
Building PDK-Java Portlets with Oracle JDeveloper
6.3.1
Installing the Portal Extension for Oracle JDeveloper
6.3.2
Building PDK-Java Portlets
6.3.2.1
Creating a Portlet and Provider
6.3.2.2
Adding Portlet Logic
6.3.2.3
Validating Your Portlet and Provider
6.3.2.4
Deploying to an Application Server
6.3.2.5
Registering and Viewing Your Portlet
6.4
Introduction to Java Portlet Specification (JPS) and WSRP
6.4.1
The Relationship Between WSRP and JPS
6.5
Building JPS-Compliant Portlets with Oracle JDeveloper
6.5.1
Installing the Portal Extension for Oracle JDeveloper
6.5.2
Building JPS-compliant Portlets
6.5.2.1
Creating a Portlet
6.5.2.2
Adding Portlet Logic
6.5.2.3
Deploying Your Portlet to an Application Server
6.5.2.4
Registering and Viewing Your Portlet
7
Enhancing Java Portlets
7.1
Enhancing PDK-Java Portlets
7.1.1
Adding Show Modes
7.1.1.1
Assumptions
7.1.1.2
Implementing Extra Show Modes
7.1.1.3
Updating the XML Provider Definition
7.1.1.4
Viewing the Portlet
7.1.2
Adding Personalization
7.1.2.1
Assumptions
7.1.2.2
Implementing Personalization for Edit and Edit Defaults Pages
7.1.2.3
Implementing Personalization for Show Pages
7.1.2.4
Preference Information Within the XML Provider Definition
7.1.2.5
Viewing the Portlet
7.1.3
Passing Parameters and Submitting Events
7.1.3.1
Assumptions
7.1.3.2
Adding Parameters to Your Portlets
7.1.3.3
Passing Portlet URL Parameters
7.1.3.4
Submitting Events
7.1.4
Using JNDI Variables
7.1.4.1
Declaring JNDI Variables
7.1.4.2
Setting JNDI Variable Values
7.1.4.3
Retrieving JNDI Variables
7.1.5
Accessing Session Information
7.1.5.1
Assumptions
7.1.5.2
Implementing Session Storage
7.1.5.3
Viewing the Portlet
7.1.6
Implementing Portlet Security
7.1.6.1
Assumptions
7.1.6.2
Portlet Security Features
7.1.6.3
Single Sign-On
7.1.6.4
OracleAS Portal Access Control Lists (ACLs)
7.1.6.5
Portlet Security Managers
7.1.6.6
OracleAS Portal Server Security
7.1.6.7
Message Authentication
7.1.6.8
HTTPS Communication
7.1.6.9
LDAP (Oracle Internet Directory) Security
7.1.7
Controlling the Export/Import of Portlet Personalizations
7.1.7.1
Import/Export Programming Interface
7.1.7.2
Exporting Personalizations Example
7.1.7.3
Implementing Security for Export/Import
7.1.8
Enhancing Portlet Performance with Caching
7.1.8.1
Assumptions
7.1.8.2
Activating Caching
7.1.8.3
Adding Expiry-Based Caching
7.1.8.4
Adding Invalidation Based Caching
7.1.8.5
Adding Validation-Based Caching
7.1.9
Enhancing Portlets for Mobile Devices
7.1.9.1
Accessing Configuration, User, and Device Information
7.1.9.2
Modifying Navigation for Mobile Portlets
7.1.10
Writing Multilingual Portlets
7.1.10.1
Assumptions
7.1.10.2
Internationalizing Your Portlet
7.1.10.3
Viewing the Portlet
7.2
Enhancing JPS Portlets
7.2.1
Adding Personalization
7.2.1.1
Assumptions
7.2.1.2
Implementing Personalization
7.3
Building Struts Portlets with Oracle JDeveloper
7.3.1
OracleAS Portal and the Apache Struts Framework
7.3.1.1
Model View Controller Overview
7.3.1.2
Apache Struts Overview
7.3.1.3
OracleAS Portal Integration with Struts
7.3.1.4
Summary
7.3.2
Creating a Struts Portlet
7.3.2.1
Creating a Struts Portlet
7.3.2.2
Registering the Provider
7.3.2.3
Summary
8
Creating PL/SQL Portlets
8.1
Guidelines for Creating PL/SQL Portlets
8.1.1
Portlet Show Modes
8.1.2
Recommended Portlet Procedures and Functions
8.1.3
Guidelines for Mobile Portlets
8.2
Building PL/SQL Portlets with the PL/SQL Generator
8.2.1
Creating the Input XML File
8.2.2
Running the PL/SQL Generator
8.2.3
Publishing the Generated PL/SQL Portlet
8.2.3.1
Installing the Packages in the Database
8.2.3.2
Registering the Database Provider
8.2.3.3
Adding Your Portlet to a Page
8.3
Building PL/SQL Portlets Manually
8.3.1
Implementing the Portlet Package
8.3.2
Implementing the Provider Package
8.3.3
Adding Your Portlet to a Page
8.4
Implementing Information Storage
8.4.1
Implementing a Preference Store
8.4.1.1
Using a Preference Store
8.4.1.2
Creating and Accessing a Preference Store
8.4.2
Implementing a Session Store
8.4.2.1
Creating and Accessing a Session Store
8.5
Using Parameters
8.5.1
Passing Private Parameters
8.5.2
Passing Page Parameters and Mapping Public Portlet Parameters
8.5.3
Retrieving Parameter Values
8.6
Accessing Context Information
8.6.1
Using Context Information
8.6.2
Using wwctx_api to Obtain Context Information
8.7
Implementing Portlet Security
8.7.1
Using Security
8.7.1.1
Guidelines for Using the Security APIs
8.7.2
Coding Security
8.8
Improving Portlet Performance with Caching
8.8.1
Using Caching
8.8.1.1
Validation-Based Caching
8.8.1.2
Expiry-Based Caching
8.8.1.3
Invalidation-Based Caching
8.8.2
Configuring and Monitoring the Cache
8.8.3
Implementing Validation-Based Caching
8.8.4
Implementing Expiry-Based Caching
8.8.5
Implementing Invalidation-Based Caching
8.9
Implementing Error Handling
8.9.1
Using Error Handling
8.9.1.1
Guidelines for Error Handling
8.9.2
Adding Error Handling
8.10
Implementing Event Logging
8.10.1
Using Event Logging
8.10.1.1
Guidelines for Event Logging
8.10.2
Adding Event Logging
8.11
Writing Multilingual Portlets
8.11.1
Using Multilingual Support
8.11.2
Adding Multilingual Support
8.11.2.1
Loading Language Strings
8.11.2.2
Retrieving Language Strings
8.12
Enhancing Portlets for Mobile Devices
8.12.1
Accessing the DeviceClass Header
8.13
Registering Providers Programmatically
8.13.1
Registration Prerequisites
8.13.2
Provider Record Input
8.13.3
Registration Example
Part III Appendixes
A
Creating Portlets with the Portlet Builder
A.1
Using a Wizard to Build a Portlet
A.1.1
Creating a Schema in OracleAS Portal
A.1.1.1
Creating a Schema
A.1.1.2
Granting and Revoking Privileges on Database Objects
A.1.1.3
Enrolling the Schema in One or More Roles
A.1.2
Creating a Provider for Locally Built Portlets
A.1.3
Exposing a Provider
A.1.4
Creating Portlets Using OracleAS Portal Wizards
A.1.4.1
Building Portlets Declaratively
A.1.4.2
Building Forms Declaratively
A.1.4.3
Building Reports Declaratively
A.1.4.4
Building Forms and Reports against
inter
Media Rich Content
A.1.4.5
Building Charts Declaratively
A.1.4.6
Building Lists of Values Declaratively
A.2
Editing a Portlet Builder Component
A.3
Managing Portlets
A.3.1
Navigating to the Component Management Page
A.3.2
Renaming a Portlet
A.3.3
Deleting a Portlet
A.3.4
Copying a Portlet
A.3.5
Generating the PL/SQL Package for a Portlet
A.3.6
Viewing Source Code
A.3.6.1
Viewing the Package Spec and Body for a Portlet
A.3.6.2
Viewing the Call Interface for a Portlet
A.3.7
Managing Locks on Portlets
A.4
Managing Versions
A.5
Managing Portlet Security
A.5.1
Granting Portlet Access Privileges
A.5.1.1
Inheriting Portlet Access Privileges from a Provider
A.5.1.2
Granting Access Privileges to Individual Users
A.6
Performing Test Runs on a Portlet
A.6.1
Running a Component as a Full Page
A.6.2
Running a Component as a Portlet
A.6.3
Running a Component through the Customization Form
A.6.4
Running the Component as a Portlet through the Portlet Customization Form
A.6.5
Running in Batch Mode
A.6.5.1
Setting init.ora Parameters for Batch Jobs
A.6.5.2
Adding a Batch Button to an Existing Component
A.7
Referencing the OracleAS Portal Schema
A.8
Coding Additional Functionality
A.8.1
Using Bind Variables
A.8.2
Writing Event Handlers for Items on Forms
A.8.2.1
Writing a JavaScript Event Handler for an Item on a Form
A.8.2.2
Writing a PL/SQL Event Handler for a Button on a Form
A.8.3
Using PL/SQL to Get and Set Values in a Form
A.8.4
Using PL/SQL to Get or Set Cookies in a Form or Report
A.8.5
Defining Values through Page Parameters
A.9
Using Shared Components to Create a Look and Feel
A.9.1
Granting Access to Shared Components
A.9.2
Using JavaScript to Create Field- and Form-Level Validation
A.9.2.1
Guidelines for Writing Field- or Form-Level Validation JavaScript
A.9.2.2
Creating JavaScript under the Shared Components Provider
A.9.2.3
Adding JavaScript to a Form
A.9.3
Creating Color Definitions
A.9.4
Creating Image Definitions
A.9.5
Creating Font Definitions
A.9.6
Using User Interface Templates
A.9.6.1
Building a Structured User Interface Template
A.9.6.2
Building an Unstructured User Interface Template
A.9.6.3
Configuring a Page Group to Allow Use of UI Templates
A.9.6.4
Applying a UI Template to a Page
A.10
Example: Building Charts and Reports
A.10.1
Exercise: Building the Team Details Report
A.10.2
Exercise: Building the Average Salaries Chart
A.10.3
Exercise: Building the Team Bonuses Report
B
Troubleshooting Portlets and Providers
B.1
Diagnosing Java Portlet Problems
B.1.1
Portlet Logging
B.1.2
Installation and Deployment Problems
B.1.2.1
Cannot Find a Java Class Object
B.1.2.2
Cannot Deploy the template.ear File
B.1.2.3
Error When Attempting to Register Provider
B.1.2.4
Error Adding a Portlet to a Provider
B.1.2.5
Portlet Does Not Exist
B.1.2.6
File Not Found
B.1.2.7
XML Parser Error
B.1.2.8
Error Adding Portlets
B.1.2.9
Content Request Timed Out
B.1.2.10
Message 500 Returned
B.1.3
Java Portlet Wizard Not Available
B.1.4
Portlet Code Does Not Compile
B.1.5
Application Server Connection Test Fails
B.1.6
Provider Test Page Shows Error
B.1.7
Web Provider Not Appearing in Portlet Repository
B.1.8
Portlet Does Not Display on Page
B.1.9
After Initial Successful Display, Portlet Does Not Display on Page
B.1.10
Provider Group Not Created
B.1.11
URL-Based Portlet Does Not Work
B.2
Diagnosing OmniPortlet Problems
B.2.1
OmniPortlet Cannot Access the Specified URL
B.2.2
Portlet Content Is Not Refreshed
B.2.3
Edit Defaults Changes are Not Reflected in the Customized Portlet
B.3
Diagnosing Web Clipping Problems
B.3.1
Setting Logging Levels
B.3.2
Reviewing Error Messages
B.3.3
Checking the Status of the Provider with the Test Page
B.3.4
Problem Connecting to the Web Site for Clipping
B.3.5
HTTP Error Code 407 When Clipping Outside Firewall
B.3.6
Cannot Clip a Page
B.3.7
Images Not Retrieved with Clipping
B.3.8
Resolving Problems with Migration of URL-based Portlets
B.3.8.1
File Not Found Exception When Running Migration Tool
B.3.8.2
Null Pointer Exception When Running Migration Tool
B.3.8.3
Target provider.xml is Already Migrated Error
B.3.8.4
Cannot Migrate provider.xml with Class Error
B.4
Need More Help?
C
Manually Packaging and Deploying PDK-Java Providers
C.1
Introduction
C.1.1
WAR and EAR files
C.1.2
Service Identifiers
C.2
Packaging and Deploying Your Providers
C.2.1
Packaging Your Provider
C.2.1.1
Preparing Your Directories
C.2.1.2
Specifying Your Default Service
C.2.1.3
Creating Your WAR File
C.2.1.4
Creating Your EAR File
C.2.2
Deploying Your EAR File
C.2.2.1
Deploying with the Grid Control Console
C.2.2.2
Deploying Manually with dcmctl
C.2.2.3
Deploying Manually to Standalone OC4J
C.2.3
Testing Deployment
C.2.4
Setting Deployment Properties
C.2.4.1
Setting the Variables
C.2.5
Securing Your Provider
C.2.6
Registering Your Provider
D
OracleAS Portal Provider Test Suite
D.1
Provider Test Page
D.2
Test Harness
D.2.1
Test Definition File
D.2.2
runTest Command
D.2.3
Running a Test with Test Harness
Glossary
Index