Oracle Portal Developer Kit
Installing the PDK-URL NLS portlets

Welcome to the PDK-URL Services. Now that you have successfully downloaded and installed the PDK-URL Services Framework and Samples, you may want to use PDK-URL Services to create other URL-based portlets. PDK-URL Services has extended PDK-Java to support portlets created in any Web-based language. This article describes how to install and configure the PDK-URL Services NLS Portlets. These portlets are best viewed with IE 5.0 and above.

### ASSUMPTIONS

1. You have already downloaded and installed the samples with the most recent PDK-Java Framework and and understand the steps required to display a URL Services Portlet on a portal page. For more information on installing PDK-Java and Samples, please review the Installing the JPDK and Samples article.

2. You are using this sample with Portal 3.0.8 and up.

3. You have installed Portal on a database that is using a character set compatible with the language of your portlet. For example, if your portlet has multibyte characters then the Portal database must be using a character set compatible with this (i.e., UTF-8).

4. You are using JPDK 1.4 and up.

### SETUP

Note: This section will update an Oracle HTTP Server configuration file, zone.properties. We recommend that you backup file before making the changes specfiied. zone.properties is located at %ORACLE_HOME%\Apache\Jserv\servlets on NT. This file is located at $ORACLE_HOME/Apache/Jserv/etc on UNIX.

Updating the zone.properties

1. Stop the Oracle HTTP Server.

2. Open zone.properties.

3. Under the Servlet Aliases section add the following:

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

4. Under the Aliased Servlet Init Parameters section, add the following:

       servlet.nls.initArgs=provider_root=C:\urlservices\providers\nls,sessiontimeout=1800000, debuglevel=1

5. Save and close the file.

6. Start the Oracle HTTP Server.

7. Now, test that you can execute the Adapter by calling the newly added alias. For example, type in the URL:

       http://host.domain:port/servlet/nls

8. You should receive a sample page.

Updating provider.xml

1. Go to the location of the provider.xml for this NLS Portlets (C:\urlservices\providers\nls). It is located in the C:\urlservices\providers\nls 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.

### VIEW PORTLET

1. Now that you have successfully tested your new alias and updated the provider.xml file, you will need to register a new provider that calls this alias.

2. Register your new Provider.

   1. Name: MyNLSProvider

   2. Display Name: My PDK-URL NLS Provider

   3. Provider ID: Leave blank, it will automatically be generated

   4. Timeout: 100

   5. Timeout Message: My PDK-URL NLS Provider Timed Out

   6. Implementation Style: Web

   7. Register on Remote Nodes: No

   8. Provider Login Frequency: Never

   9. URL: http://host.domain:port/servlet/nls

3. Click on OK.

4. Now add your new portlet to a page.

5. To view the portlet in the appropriate language, select the following in IE 5.0 or above.
   1. View -> Encoding -> Japanese(EUC) for the Japanese portlet.

6. If browser is not I.E (5.0 or higher), then you must download the appropriate fonts to render multi-byte character sets.
   1. A simple way of downloading a font is to use IE for viewing the URL. If the font is not present, it is downloaded automatically. Then,
      1. Set the browser encoding to the respective local language encoding.

         1. In I.E. encoding can be set using View -> Encoding -> <Encoding-Type>

         2. Go into Preferences and set the font based on what was downloaded using IE. Then, view by by selecting View -> Character Set -> <Character-set-Type>

You have successfully installed your own PDK-URL Services NLS portlet using URL services. Review the following URL services articles for detailed information about the URL services architecture:

> - A Primer on URL Services
> - URL Services Runtime
> - Understanding the Provider.xml for URL Services

Revision History:

- August 28, 2001