Oracle9iAS Portal Developer Kit
A Primer on URL-based Portlets

The Oracle9iAS Portal Developer Kit currently provides services for Java and PL/SQL. These services allow developers to integrate Java classes and servlets, Java Server Pages, and PL/SQL as portlets within Oracle9iAS Portal using Portal APIs. The PDK-PL/SQL and PDK-Java (JPDK) provide samples, utilities, and articles to easily develop portlets in PL/SQL and Java. To simplify developing portlets in any language, the Oracle9iAS Portal Developer Kit introduces PDK-URL Services.

PDK-URL Services allow developers to take any application written in any language and easily create integrated portlets. PDK-URL Services takes the URL of an application, parses the content, and uses the PDK-Java framework to create a portlet. This process allows each show mode of your portlet to be rendered from different applications and/or languages. For example, you may consider a portlet whose show mode is rendered using PERL, edit mode is rendered using ASP, help mode is rendered using HTML, details mode is rendered using JSP, etc. The increased flexibility of PDK-URL Services offers many advantages:

- Eliminates the learning curve for Developers integrating their services with Oracle9iAS Portal.

- Enables the use of existing web sites and content.

- No requirement to learn or use the Oracle9iAS Portal APIs.

- Allows developers not familiar with PL/SQL, Java, Java Servlets, JSPs, or XML to easily integrate with Oracle9iAS Portal.

- Allows multiple language rendering within a single portlet.

- Allows portlet definition within a single file.

The current PDK-Java Framework allows developers to define and list portlets through the provider.xml file and limits the amount of programming required. The PDK-URL Services extends this Framework and takes advantage of its ease and simplicity. Therefore, creating URL portlets follows the same steps and configuration needed to create Web portlets with a few exceptions. The following are a few basic steps to create a URL portlet.

- Create your application in any language.

- Configure your application to be accessible through a URL.

- Define your application through the provider.xml by providing a URL.

- Register your provider as a "Web" provider through Oracle9iAS Portal.

- Add the portlet to a page.

ARCHITECTURE

The current PDK-Java Framework (JPDK) consists of the Web Provider Adapter, Web Provider Interfaces, Web Provider Runtime, and provider.xml. PDK-URL Services continue to use the existing JPDK classes and only extends the framework where required for rendering content from a URL. This section describes the architecture of PDK-Java Framework additions and updates directly related to URL Rendering. It does not cover the architecture of the existing PDK-Java Framework, for more information on this, review A Primer on Web Providers.

PDK-URL Services takes advantage of the ease and simplicity of creating Web portlets by allowing you to define and list your URL portlets within the provider.xml file. PDK-URL Services also eliminates the need to do any additional programming by including a default runtime that handles portlet creation, integration, and communication with Oracle9iAS Portal. The three main areas of PDK-URL Services are the URL Services Interface, URL Services Runtime, and provider.xml.

URL Services Interface

The URL Services Interface are simply additions to the Web Provider Interfaces included within the JPDK. The interfaces specific to URL rendering are:

- oracle.portal.provider.v1.ContentFilter - specifications for filtering URL content.

URL Services Runtime

The URL Services Runtime extends classes from the current Web Provider (JPDK) Runtime to adapt to the new URL rendering capabilities. The URL Services Runtime is comprised of a set of runtime classes. For more information on the Web Provider Runtime, review Understanding the Web Provider Runtime.

- oracle.portal.provider.v1.http.URLProvider extends the Web Provider Runtime class DefaultProvider. This class represents the Provider for all portlets rendered using PDK-URL Services.

- oracle.portal.provider.v1.http.URLPortlet extends the Web Provider Runtime class DefaultPortlet. This class parses all of the XML content within the provider.xml referring to URL rendering.

- oracle.portal.provider.v1.http.URLSecurityManager implements the Web Provider Interface defined by oracle.portal.provider.v1.PortletSecurityManager. This class manages portlet access and security.

- oracle.portal.provider.v1.http.URLRenderer implements the Web Provider Interfaces defined by oracle.portal.v1.PortletRenderer. The URLRenderer allows you to use the URL to render the content of a request.

- oracle.portal.provider.v1.http.XMLFilter implements the Web Provider Interface defined by oracle.portal.provider.v1.ContentFilter. This filter converts the HTML contents received from a URL into XHTML.

- oracle.portal.provider.v1.http.HtmlFilter implements the Web Provider Interface defined by oracle.portal.provider.v1.ContentFilter. This filter converts the HTML contents into Oracle9iAS Portal compliant HTML.

- DefaultXhtml.xsl is a default stylesheet that converts XHTML to Oracle9iAS Portal compliant XHTML.

Provider definition - provider.xml

The current provider.xml stores information by hierarchy and is used to define and list available portlets. The provider.xml is associated with only one provider. The default provider within the xml file is oracle.portal.provider.v1.http.DefaultProvider. However, in order to take advantage of PDK- URL Services, you will need to specify oracle.portal.provider.v1.http.URLProvider. The URLProvider parses the additional/updated tags within the provider.xml file. The URLProvider can handle standard provider.xml tags, but the DefaultProvider cannot handle tags within the provider.xml that contain URL Services information. The following tags have been added or modified within the provider.xml:

- provider tag - the following are tags that have been added or modified within the provider tag.

  - authentication is a required tag that has been added to the provider tag. It holds information about the type of authentication used.

  - proxyInfo is an optional tag and holds proxy server information.

  - httpsProxyInfo is an optional tag and holds HTTPS proxy server information.

  - subscriberDetails is an optional tag that handles subscriber information for subscription billing.

- portlet tag - the following are tags that have been added or modified within the portlet tag.

  - registrationPortlet is an optional tag and specifies whether this portlet is a registration portlet for the provider.

  - redirectUrl is an optional tab and indicates the parameter name recognized by the External Application's Login URL as a URL that should be redirected to after a successful authentication. This parameter is used only if the Portlet indicates it has authenticated hyperlinks.

  - accessControl is an optional tag and indicates whether this portlet is publicly available or available only to registered users.

  - renderer is a required tag that handles rendering portlets in all show modes.

  - securityManager is a tag that handles portlet security.

For more information and in-depth descriptions refer to the following articles:

- Installing the PDK-URL Services Samples

- Understanding the PDK-URL Services Runtime

- Understanding provider.xml for PDK-URL Services

Revision History:

- October 03, 2001.

- July 12, 2001.

- July 19, 2002.