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.
-
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
-
Stop the Weblogic Server.
-
Setting Up Your Environment for PDK-URLServices
-
Open a command window.
-
Move to the %WL_HOME%\config\examples\applications\DefaultWebApp\WEB-INF
directory
-
Create directory named lib.
-
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. |
-
Setting Environment for HttpProvider Servlet Aliases and Servlet Init
Parameters
-
Move to the %WL_HOME%\config\examples\applications\DefaultWebApp\WEB-INF
directory
-
Open web.xml in any text editor.
-
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>
|
-
Save and close the web.xml file.
-
Move to %WL_HOME%\config\examples and execute setExamplesEnv.cmd
to set CLASSPATH for new lib files
-
Execute startExamplesServer.cmd to start your Weblogic server.
Viewing the provider.xml
-
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.
-
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>
-
If you need to use your own proxy server, alter the <httpProxyHost>,
<httpProxyPort>, <httpsProxyHost>, and <httpsProxyPort> tags and
specify your proxy server and port.
-
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>
-
Save and Close the file.
Testing the sample
You can test that you have properly setup the sample by using Weblogic
Server.
-
Start your WebLogic Server.
-
Execute the sample from a browser window.
For example type : http://myserver.mydomain.com:port/urlsample
-
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.
-
Under the Administer tab in the Oracle 9iAS Portal homepage, click
on Add a Portlet Provider within the portlet called Provider.
-
Enter Provider information for the Sample.
-
Name: URLSamples
-
Display Name: PDK-URL Services Samples
-
Timeout: 10
-
Timeout Message: PDK-URL Services Samples Timed Out
-
Implementation Style: Web
-
Provider Login Frequency: Never
-
Register on Remote Nodes: No
-
URL: http://myserver.mydomain.com:port/urlsample (replace this with
your URL)
-
Check the following radio button: The user has the same identity
in the HTTP providers application as in the Single Sign-On identity.
-
Proxy: No (As long as no proxy is required to contact the
Provider Adapter).
-
Click OK.
Adding the Portlet to a Page
-
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