Oracle9iAS Portal Developer Kit
Installing the PDK-URL Services Samples

Welcome to the PDK-URL Services. Now that you have successfully installed the PDK-Java Framework (JPDK) and samples, you can use PDK-Java to create URL-based portlets. The PDK-Java has been extended to support portlets created in any Web-based language. This article describes how to install and configure the PDK-URL Services framework and samples

### REQUIREMENTS

1. Oracle9iAS Portal 3.0.8.9.8 or later. Most features of the PDK-URL Services work with older versions, but is only certified against this version of Oracle9iAS Portal. Certain features such as authenticated portlets will not work on older versions of Oracle9iAS Portal.

2. JPDK 1.4 or later.

### ASSUMPTIONS

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

2. According to the above installation instructions, you already have the location of the samples.jar and provider.jar in the jserv.properties file.

###
SETUP

Note: This section will update two Oracle HTTP Server configuration files, zone.properties and jserv.properties. We recommend that you backup these two files before making the changes specified. zone.properties is located at %ORACLE_HOME%\Apache\Jserv\servlets on NT, jserv.properties is located at %ORACLE_HOME%\Apache\Jserv\conf on NT, and both files are located at $ORACLE_HOME/Apache/Jserv/etc on UNIX.

Configuring PDK-URL Services Sample

1. Stop the Oracle9iAS HttpServer.

2. Open the jserv.properties file. This file specifies the classpath for Oracle9iAS. Add the classpath to the jar files that contain the PDK-URL Services classes and XML filter needed for URL rendering. Scroll down to the end of the file and enter the following.

> wrapper.classpath=D:\urlservices\lib\urlservices.jar

> wrapper.classpath=D:\urlservices\lib\tidy.jar

3. If you are using the Oracle Http Server only for your PDK-URL Services' listener, you will also need to add the following to your jserv.properties file. If you are using Oracle9iAS Portal as your listener, you should not need to add the following. To verify, Search the jserv.properties to see if it already points to the location of a http_client.jar file.

> wrapper.classpath=D:\urlservices\lib\http_client.jar

4. Open the zone.properties file. This document uses the root zone which has a virtual path of "/servlets". For manageability, you may choose to use a different zone.

5. Under the Servlet Aliases section, add the alias that points to the Provider Adapter:

   servlet.urlsample.code=oracle.portal.provider.v1.http.HttpProvider

   Under the Aliased Servlet Init Parameters section, add the initial arguments needed by the PDK-URL Services samples. This points the Adapter (urlsample) to the location of the provider.xml file. Make sure to modify the directory to point to the correct location of the provider.xml file.

   servlet.urlsample.initArgs=provider_root=D:\urlservices\providers\urlsample,sessiontimeout=1800000, debuglevel=1

   Note: the sessiontimeout must match the session timeout setting located in the zone.properties of your Apache listener. Both settings are specified in milliseconds. Please review the release notes of the PDK-Java (JPDK) download for more information on these arguments.

4. Save and close the zone.properties file.

Viewing the provider.xml

1. Go to the location of the provider.xml for PDK-URL Services. It is located in the D:\urlservices\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 URLs over the internet, so if you may or may not need a proxy server to access external URLs.

   1. If you do not need to use a proxy server, remove the following tags.

      <proxyInfo class="oracle.portal.provider.v1.http.ProxyInformation">

      <httpProxyHost>www-proxy.us.oracle.com</httpProxyHost>

      <httpProxyPort>80</httpProxyPort>

      </proxyInfo>

      <httpsProxyInfo class="oracle.portal.provider.v1.http.ProxyInformation">

      <httpsProxyHost>www-proxy.us.oracle.com</httpsProxyHost>

      <httpsProxyPort>80</httpsProxyPort>

      </httpsProxyInfo>

   2. If you need to use your own proxy server, alter the <httpProxyHost>, <httpProxyPort>, <httpsProxyHost>, and <httpsProxyPort> tags and specify your proxy server and port.

2. Notice that the file contains four portlets, you will need to modify one :

   - XML Filter Portlet

     - Alter 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>D:\urlservices\providers\urlsample\default_mit.xsl</stylesheet>

3. Save and close the file.

Testing the Sample

You can test that you have properly setup the sample by using Oracle9iAS.

1. Start your Oracle9iAS listener.

2. Execute the sample from the Oracle9iAS listener. This refers to the listener where you configured your sample.

   For example: http://myserver.mydomain.com:port/servlets/urlsample

3. You should receive a test page informing you that the sample worked. If you do not receive the test page, verify that you can execute standard servlets using Oracle9iAS. Then, verify all the steps within the SETUP section.

Registering the Provider

After setting up the Web provider with the Oracle HTTP Server, you must now register the provider with Oracle9iAS Portal before adding the sample portlet(s) to your page.

1. Under the Administer tab in the Oracle9iAS Portal Home Page, click on Add a Portlet Provider within the portlet called Provider.

2. Enter Provider information for the Sample.

   1. Name: URLSamples

   2. Display Name: URL Services Samples

   3. Timeout: 10

   4. Timeout Message: URL Services Samples Timed Out

   5. Implementation Style: Web

   6. Provider Login Frequency: Never

   7. Register on Remote Nodes: No

   8. URL: http://myserver.mydomain.com:port/servlets/urlsample (replace this with your URL)

   9. Check the following radio button: The user has the same identity in the HTTP providers application as in the Single Sign-On identity.

   10. Proxy: No (As long as no proxy is required to contact the Provider Adapter).

3. Click OK.

Adding the Portlet to a Page

1. Add the PDK-URL Services samples to a page. The portlets will be listed under the Provider called "URL Services Samples". Each portlet much be added to a page individually.

Revision History:

- October 03, 2001

- July 12, 2001