Oracle9iAS Portal Developer Kit (PDK)
Using PDK-Java and mod_osso to Integrate a Partner Application with Oracle9iAS Portal (V2)

Creation Date: January 18, 2002
Status: Version 4
Version: PDK Release 2, (9.0.2 and later)

Introduction

This document describes how you can use the PDK-Java and mod_osso to integrate a partner application with Oracle9iAS Portal. A partner application is a web based application that shares the same Single Sign-On (SSO) Server as Oracle9iAS Portal for its authentication. This means that when a user is already logged into Oracle Portal, their identity can be asserted to the partner application without them having to log in again.

For even tighter integration with Oracle9iAS Portal, a partner application can be exposed as a web provider using the PDK-Java, so that it may be accessed from a portlet on a Oracle Portal page. This document demonstrates this style of integration by looking at an example web application, "Flights of Fancy", and describing how its integration with Oracle Portal is performed.  The Flights of Fancy application displays a list of flights for a user and provides links to display the details of a flight.

The Flights of Fancy application consists of two pages, a summary page listing a number of flights and a detail page showing details of a specific flight. Clicking of the flight number takes you from the summary page to the detail page. When integrated with Oracle Portal the summary page is exposed as a portlet and clicking on the flight number in the portlet takes you from the portal to the Flight of Fancy application where the detailed page is displayed without requiring the user to login. This type of link that takes a user from Portal to an application is known as a "deep link".

The above image shows the summary page of the Flight of Fancy Applications.

Related Documents

Installation

This section contains instructions for installing the Flights of Fancy sample partner application.

Step 1: Installing and Configuring PDK-Java

Step 2: Configuring mod_osso

Step 3: Registering the Partner Application Provider with Oracle Portal

Step 4: Changing the cookie domain

This sample code uses a session cookie to share information between the portlet and the web application. By default OC4J sends the session cookies back to the caller with a cookie domain set to the machine that the PDK-Java was installed on. When the browser makes a request for a page it looks at the host from the request and sends all cookies whose cookie domain matches the host. The problem arises when Oracle Portal and the PDK-Java are on different machines, in this case a session created from the servlet will not be shared by Oracle Portal and vice versa. Consequently it is necessary to widen the cookie domain so that it encompasses both the PDK-Java host and the Oracle Portal host.

Implementation

This section takes a look at how the Flights of Fancy application is implemented.

Source Files

The complete Java source code for this example partner application is included in the PDK-Java distribution, under the directory src/oracle/portal/sample/v2/devguide/partnerApp. The files are:

Code implementation

In a partner application, the application URLs that are considered secure should perform an application specific security check to determine whether a user has been authenticated.  This security checks are performed in two different ways. When the application is being called as a stand alone servlet and the deep links on the Flights of Fancy portlet are protected by mod_osso which checks if the user is logged on and if not prompts the user for a username/password. When a portlet is called the provider does a check is made to verify that the user is logged on.

The entry point to the "Flights of Fancy" application from outside the Oracle Portal is the PartnerServlet class. The entry point to the "Flights of Fancy" application when it is called from inside the Oracle Portal is the PartnerProvider class. Each of these call the process() methods which check handle the request and then displays the requested URL.

The class FlightDispatch does most of the work for this sample. In this class there are two equivalent methods called process which handle requests from Oracle Portal or a servlet request. The only real difference between these methods is how they extract information from the request.

process(HttpServletRequest req, HttpServletResponse res) a servlet request

process(PortletRenderRequest pr) an Oracle Portal request

Revision History:
Revision No Last Update
1.0 January 18, 2002.  First V2 revision.
2.0 March 20, 2002,. Added mod_osso information.
3.0 September 10, 2002, Rewrite this to include just configuration information
4.0 October 31, 2002, Improved mod_osso config instructions

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065, USA
http://www.oracle.com/
Worldwide Inquiries:
1-800-ORACLE1
Fax 650.506.7200
Copyright and Corporate Info