# Oracle Application Server Portal Developer Kit (PDK)
Installing the PDK-URL Services Sample Portlets

Last Updated: | November 13, 2003
Status: | Production
Version: | PDK Release 9.0.4

## Overview

Welcome to URL-based portlets. Now that you have successfully installed the PDK Framework and samples, you may want to create URL-based portlets.

Note: URL-based portlets enable you to expose content from external websites as portlets using a manual, XML file-based approach. However, if you are targeting your provider to be registered with OracleAS Portal 9.0.2 or later, the recommended approach to perform the same task is to use the Web Clipping Portlet. To find out about using Web Clipping or how to migrate your URL-based portlet to Web Clipping, go to the OmniPortlet and Web Clipping area of Portal Center.

URL-based portlets has extended the PDK to support portlets created in any Web-based language. This article describes how to install and configure the URL-based portlet samples. There are three portlets in the URL-based samples:

- Google
- MIT
- Stardeveloper

The URL-based portlets are pre-configured within jpdk.ear, with a service ID of urn:urlsample

## Minimum Requirements

1. OracleAS Portal 3.0.8.9.8 or later.
2. PDK 9.0.2.

## Assumptions

1. You have already successfully installed the PDK Framework and samples by following the Installing the PDK Framework and Samples article. These samples use the PDK Framework.

## Configuring and Testing the Sample Provider

The URL-based portlets are pre-configured within the jpdk.ear. However, you may need to change the provider.xml file to specify the proxy server you use. Open the provider.xml file for the sample (it should be located in the WEB-INF/providers/urlsample directory) and provide appropriate replacement values for the following tags:

1. Go to the location of the provider.xml for URL-based portlets. It is located in the <OC4J_HOME>\j2ee\home\applications\jpdk\jpdk\WEB-INF\providers\urlsample directory. The provider.xml file is setup to use a proxy server.

   Note: You will either need to alter these tags or remove them. The portlets access URL's over the internet, so if you may or may not need a proxy server to access external URL's.

>     <proxyInfo class="oracle.portal.provider.v2.ProxyInformation">
>         <httpProxyHost>proxyServer.myDomain.com</httpProxyHost>
>         <httpProxyPort>80</httpProxyPort>
>     </proxyInfo>

2. Notice that the file contains three portlets, you will need to modify the stylesheet location for the XML Filter portlet. Modify the <stylesheet> tag to point to the correct location of the XML stylesheet. It is located in the sample directory as the provider.xml.

   For example: <stylesheet><OC4J_HOME>\j2ee\home\applications\jpdk\jpdk\htdocs\urlsample\default_mit.xsl</stylesheet>

Next, you can test that the sample is properly configured with OC4J.

1. Execute the sample provider servlet from OC4J.

   For example: http://myserver.mydomain.com:port/jpdk/providers/urlsample

2. Review the content of the test page displayed.
3. If you did not receive the test page, verify that you can execute standard servlets using Oracle Application Server.

## Registering Your Provider

You must now register the provider with OracleAS Portal.

1. On the Build tab of the Portal Design-Time Pages root page, click on Register a Portlet Provider within the portlet called Provider.
2. Enter Provider information for the Sample.
   - Name: URLsample
   - Display Name: URL-based Portlet Samples
   - Timeout: 300
   - Timeout Message: URL based portlets Timed Out
   - Implementation Style: Web
   - URL: http://myhost.com:8888/jpdk/providers (if you're using OracleAS Portal 3.0.9, append the service id, urlsample, to the URL)
   - Service Id: urn:urlsample
   - Login Frequency: Never
3. Click Finish.

## Adding Your Portlet to a Page

Add the URL based portlet samples to a page. The portlets will be listed under the Provider called "URL-based portlet Samples". You have now successfully installed and setup the URL-based portlet samples.

Revision History: |
Revision No | Last Update | Description
1.0 | March, 2002 | Created
2.0 | August, 2002 | Revised for v2 PDK
2.1 | August 10, 2003 | Revised branding and applied PDK Stylesheet
2.2 | November 13, 2003 | Added Web Clipping note

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