Oracle9iAS Portal Developer Kit
Installing PDK-URL Services providers on Weblogic

Welcome to the PDK-URL Services. Now that you have successfully installed the Weblogic 6.1 Server, you may want to use the PDK-URL Services to create URL-based portlets. The PDK-URL Services extends the PDK-Java 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. Oracle 9iAS Portal 3.0.8.9.8 or later.

The instructions below assume that you have Oracle9iAS Portal installed, however you do not need a Oracle9iAS Portal installed to register and display your portlets. You can register your provider on Oracle9iAS Portal Studio, a hosted portal

### ASSUMPTIONS

- You have already successfully installed the Weblogic Server.
- You have already downloaded the PDK-Java Framework and PDK-URL Services from http://portalstudio.oracle.com/

### SETUP

Note: In this section we edit Server configuration files web.xml. We recommend that you backup these files before making the changes specified. web.xml is located at %WL_HOME%\config\examples\applications\DefaultWebApp\WEB-INF on NT.

Configuring the PDK-URL Services Sample

1. Stop the Weblogic Server.
2. Setting Up Your Environment for PDK-URLServices

1. Open a command window.
2. Move to the %WL_HOME%\config\examples\applications\DefaultWebApp\WEB-INF directory
3. Create directory named lib.
4. Copy provider.jar,samples.jar,http_client.jar,tidy.jar,urlservices.jar,xmlparserv2.jar into the lib directory from your PDK-Java and PDK-URL Services download.

Jar File | Description
xmlparserv2.jar | Oracle XML parser
provider.jar | PDK-Java provider API
samples.jar | Samples for PDK-Java providers
http_client.jar | To handle HTTPconnection and cookies.
tidy.jar | To convert HTML data into XHTML used by XmlFilter.
urlservices.jar | URLServices API.

3. Setting Environment for HttpProvider Servlet Aliases and Servlet Init Parameters

1. Move to the %WL_HOME%\config\examples\applications\DefaultWebApp\WEB-INF directory
2. Open web.xml in any text editor.
3. Add an HttpProvider servlet properties in your web.xml.

<servlet> <servlet-name>urlsample</servlet-name> <servlet-class>oracle.portal.provider.v1.http.HttpProvider</servlet-class> <init-param> <param-name>provider_root</param-name> <param-value>d:\pdk\portalstudio\pdk\urlservices\providers\urlsample</param-value> </init-param> <init-param> <param-name>sessiontimeout</param-name> <param-value>1800000</param-value> </init-param> <init-param> <param-name>debuglevel</param-name> <param-value>3</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>urlsample</servlet-name> <url-pattern>/urlsample/*</url-pattern> </servlet-mapping>

4. Save and close the web.xml file.
5. Move to %WL_HOME%\config\examples and execute setExamplesEnv.cmd to set CLASSPATH for new lib files
6. Execute startExamplesServer.cmd to start your Weblogic server.

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 :

1. 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 Weblogic Server.

1. Start your WebLogic Server.
2. Execute the sample from a browser window.
For example type : http://myserver.mydomain.com:port/urlsample
3. You should receive a test page informing you that the sample portlets under urlsample. If you do not receive the test page, Then, verify all the steps within this section.

Registering the Provider

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

1. Under the Administer tab in the Oracle 9iAS Portal homepage, click on Add a Portlet Provider within the portlet called Provider.
2. Enter Provider information for the Sample.

1. Name: URLSamples
2. Display Name: PDK-URL Services Samples
3. Timeout: 10
4. Timeout Message: PDK-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/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 "PDK-URL Services Samples". Each portlet much be added to a page individually.

Revision History:

Jan 07, 2002
Feb 27, 2002