Oracle9iAS Portal Developer Kit
Installing the URL-based Portlet Samples (V2)


Welcome to URL-based portlets.  Now that you have successfully installed the PDK Framework and samples, you may want to create URL-based portlets. 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:

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

REQUIREMENTS

  1. Oracle9iAS Portal 3.0.8.9.8 or later.  Most features of the URL-based portlets 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. 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 (V2) 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 stylesheet location for XML Filter portlet :

    1. 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><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 Oracle9iAS.

REGISTERING YOUR PROVIDER

You must now register the provider with Oracle9iAS 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.
    1. Name: URLsample
    2. Display Name: URL-based Portlet Samples
    3. Timeout: 300
    4. Timeout Message: URL based portlets Timed Out
    5. Implementation Style: Web
    6. URL: http://myhost.com:8888/jpdk/providers (if you're using Oracle9iAS Portal 3.0.9, append the service id, urlsample, to the URL)
    7. Service Id: urn:urlsample
    8. 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: