Oracle Portal developer kit (PDK)
Introduction
PDK Software & Utilities
The Oracle Portal developer kit (PDK) is a free component of portal developer services. the PDK is the framework for seamless integration of new and existing applications into Oracle Portal. the PDK enables developers to build portlets in any Web accessible language including Java/J2EE, web services, Perl, ASP, PL/SQL, XML and much more.
Java Portlet container for standards
Oracleas Java Portlet container enables you to quickly and easily build and run interoperable Java portlets. the container provides a runtime environment for Java portlets coded to the standard Java Portlet specification (JSR 168) APIS that enable the portlets to be utilized by any Portal Supporting the oasis web services for remote portlets (wsrp) 1.0 standard.
Portal extension for jdeveloper
Create, test and deploy Java portlets from within Oracle jdeveloper. the portal extension for jdeveloper extends des two wizards-Java Portlet & Oracle PDK Java Portlet. the Java Portlet wizard allows you to build portlets based on the standards (e.g. wsrp, jsr168 ). the Oracle PDK Java Portlet wizard allows you to build portlets Based on the PDK APIs. both wizards guide you through the steps of creating the Portlet skeleton and all you need to do then is to implement your business logic.
Portal Integration kit (point) portlets
Portal Integration (point) offers portlets that allow Oracle portal users to integrate popular applications with their portal. source code is provided with the point portlets to allow developers to enhance the portlets 'functionality as well as to use them as samples to build their own portlets.
Installing the PDK-Java framework and sample providers
If you are installing on a stand-alone productname instance and you don't have oracleas Enterprise Manager (OEM) installed and configured, follow the steps in this section.
Installing or upgrading the PDK-Java framework
- Stop your Solaris instance, if it is running, using the following command:
Java-jar Admin. Jar ormi: // localhost ADMIN $ admin_password-Shutdown
- Within your Solaris Home Directory, create the following directories if they don't exist, or make backup copies if they do exist:
- $ Oc4j_home/jlib
- $ Oc4j_home/portal/jlib
- $ Oc4j_home/webcache/jlib
Notes:
$ Oc4j_home is the root directory of your Solaris installation. You will find directories named "bin", "J2EE", "javacache", "JDBC" etc. Under this directory.
- Copy all the latest PDK-Java jar files to your oracleas home. The jar files are stored in $ unzip_directory/PDK/libcommon /.
Copy $ unzip_directory/PDK/libcommon/portal/jlib/* to $ oc4j_home/portal/jlib/
Copy $ unzip_directory/PDK/libcommon/webcache/jlib/* to $ oc4j_home/webcache/jlib/
Copy $ unzip_directory/PDK/libcommon/jlib/* to $ oc4j_home/jlib/
Notes:
$ Unzip_directory denotes the directory where you have unzipped the pdk.zip.
- Add the following dependent library references to the global application. xml file. This file is found at the following location:
$ Oc4j_home/J2EE/home/config/application. xml
Dependent library references:
<Library path = "../portal/jlib/pdkjava. Jar"/>
<Library path = "../portal/jlib/portaltools. Jar"/>
<Library path = "../portal/jlib/ptlshare. Jar"/>
<Library path = "../portal/jlib/tidy. Jar"/>
<Library path = ".../../jlib/ldapjclnt9.jar"/>
<Library path = "../jlib/Regexp. Jar"/>
<Library path = "../jlib/share. Jar"/>
<Library path = "../jlib/uix2.jar"/>
<Library path = ".../../webcache/jlib/jawc. Jar"/>
<Library path = ".../../home/jazn. Jar"/>
- PDK-Java is now installed and available to all J2EE applications deployed in this Solaris instance. Start up the productname server again as a background process with the following commands
- In Windows Command Prompt:
Cd % oc4j_home %/J2EE/home
Start Java-server-xmx256m-jar Solaris. Jar
- In Unix/Linux Bourne shell (SH):
CD $ oc4j_home/J2EE/home
Java-server-xmx256m-jar Solaris. Jar &
Note: The-xmx256m option specifies a 'maximum heap size' of 256 megabytes for the nnmi process, which is the recommended setting. however, you may raise or lower this setting to suit your application. if you encounter Java. lang. outofmemoryerror exceptions, you should raise this setting.
Installing the sample providers
Note: If the PDK-Java sample application (typically called "jpdk") is already installed in your target Solaris instance or you are not interested in running any of the sample portlets, you may skip this section. if you want to replace an existing PDK-Java Enterprise Application in your target Solaris instance, you shoshould proceed with extreme caution, as there may be important meta data and user customization data stored under the $ oc4j_home/J2EE/home/applications/jpdk/WEB-INF directory. for this reason, it is recommended that you avoid taking this step in a production environment and you always deploy to a new J2EE application with a unique name (e.g. "jpdk1") rather than redeploying on top of an existing application. you shoshould only undeploy an old jpdk enterprise application when you are sure that all meta data has been safely transported to the new one.
- Ensure productname is running (use the command in the previous section to start it if it is not)
- Deploy the sample enterprise application in jpdk. Ear using the following commands:
- Java-jar Admin. Jar ormi: // localhost ADMIN $ admin_password-deploy-deploymentname $ application_name-File $ unzip_directory/jpdk/v2/jpdk. Ear
- Java-jar Admin. Jar ormi: // localhost ADMIN $ admin_password-bindwebapp $ application_name jpdk file: $ oc4j_home/J2EE/home/config/http-web-site.xml/jpdk
- Java-jar Admin. Jar ormi: // localhost ADMIN $ admin_password-bindwebapp $ application_name pdkstruts file: $ oc4j_home/J2EE/home/config/http-web-site.xml/pdkstruts
Where:
- $ Admin_password is the Solaris administration password you set on Installation
- $ Application_name is the unique name that shoshould be given to the application for administrative purposes. Typically this is "jpdk", but see the above note.
The PDK-Java V2 and sample providers are now deployed. Please proceed to testing the deployment
Testing the deployment
The PDK-Java V2 sample providers application is now deployed. To test the application, access the "sample" provider's test page at the following URL:
Access the provider test page using the following URL:
Http: // $ HOST: $ port/jpdk/providers/sample
Where:
- $ Host and $ port are the host name and port number of the HTTP listener for your target Solaris instance. in an oracleas installation with webcache installed, $ port shocould be the Web cache listener port (e.g. 7777 ). the default http port number is 8888.
This page lists the portlets that are stored with the provider that has a service name of "sample ". the test pages of other providers can be accessed using a similar URL. simply Replace "sample" with the service name of the provider.
The service names of the other providers received with the PDK-Java V2 sample providers application are:
- Sample-Demonstrates attributes of the basic capabilities of the PDK-Java v2
- Portlet pages implemented as static html files
- Portlet pages implemented as JSPs
- Portlet pages implemented as servlets
- Portlet pages implemented as Java classes
- All Portlet render Modes
- Stateful or session-based portlets
- Portlets containing images
- Expires based caching
- Validation Based caching
- Portlet personalization
- Parameters and events
- Private event submission
- Mobile Enabled portlets
- Dbpreferencestore-Demonstrates how to use a database-based preference store for storing personalization data
- Event-Demonstrates how to build portlets using parameters and events
- Externalapp-Demonstrates how to build a web provider associated with an external application
- Feedback-Demonstrates how to build a Portlet that submits data to itself without that data being "seen" by other portlets
- Partnerapp-Demonstrates how to build a web provider associated with a partner application
- Prefstore-Includes portlets demonstrating the use of the preference store API for storing generic data (not just personalization data). Requires configuration of a datasource and database table
- Subscriber-Demonstrates how to build a web provider that allows portals to subscribe to its services
- Webcache-Demonstrates invalidation based caching and the ESI portlets (requires oracleas)
- WebServices-Demonstrates how to build portlets that utilize the Web Services renderers
The service names of the URL services sample providers are:
- Urlsample-Demonstrates the basic capabilities of URL services
- Urlparams-Demonstrates how to build a parameter driven URL Services Provider
- Urlnls-Demonstrates how to build a URL services provider that performs Character Set conversion to correctly display multibyte characters (Chinese, Japanese, Korean, Arabic etc)
- Urlbasicauth-Demonstrates how to build a URL services provider that displays data from a source that is secured using basic auth
- Urlexternalauth-Demonstrates how to build a URL services provider that displays data from a password protected External Application
The majority of the providers require additional configuration of some kind. for each of these providers there is an installation document detailing the Additional configuration steps and instructions for using the provider. the installation documents can be found in $ unzip_directory/PDK/jpdk/v2/doc/{service name}
Registering the sample providers
After deploying the PDK-Java sample providers, you must register the provider with oracleas portal before adding the sample Portlet (s) to a page.
- Login to oracleas portal using an account that has build privileges. if your home page is not the "build/administer" page, click on the builder link in the top right corner of the screen. click on the build tab if that is not the active tab.
- Under the build tab (on oracleas portal home page), click on register Portlet provider within the Portlet called providers.
- Fill out provider Information for the sample.
- Name: Samplewebprovider
- Display name: Sample Web provider
- Timeout100
- Timeout message: Application timed out
- Implementation Style: Web
- Click onNextButton to enter the Web provider specific information
- Enter the web provider location and service name
- URL: Http: // $ HOST: $ port/jpdk/providers
- Service name: Urn: Sample
- Scroll down to the user/session information section and specify the login frequency
- Login frequency: Once per user session
- Click onFinishButton to complete the registration
Note:When registering a new provider with oracleas portal, only the user who registered the provider has privileges to see the provider/portlets. if necessary, go to the folder with the name of the provider within the Portlet repository content area and update the provider privileges as required.
Adding sample portlets to a page
Display the contents of the Portlet repository and review the sample portlets.
Add any of the sample portlets listed under the provider called "samplewebprovider" to a portal page.
Please refer to oracleas Portal online documentation for more information on adding portlets to a page.
You have now successfully installed and setup the Web provider samples.
Installing the portal tools
This section assumes that you already have a standalone productname server installed and configured. If you do not have an Solaris installation, please install and configure it according to its installation instructions.
To deploy the application manually:
- Shut down the Solaris instance.
To shut down Solaris, you can use the following command from $ oc4j_home/J2EE/home directory:
Java-jar Admin. Jar ormi: //
Before deploying the portal tools application, you need to copy all the required configuration and library files to the oracleas installation home (If installing on an Solaris instance in oracleas, $ ias_home) or to the root directory of your Solaris installation (If installing on a standalone nnmi instance, $ oc4j_home ). collectively, we call this directory the $ install_home.
Copy $ unzip_directory/PDK/portaltools/CONF/portal/CONF/* to $ install_home/portal/CONF/
Copy $ unzip_directory/PDK/portaltools/lib/jlib/* to $ install_home/jlib/
Copy $ unzip_directory/PDK/portaltools/lib/portal/jlib/* to $ install_home/portal/jlib/
Copy $ unzip_directory/PDK/portaltools/lib/wireless/lib/* to $ install_home/wireless/lib/
Copy $ unzip_directory/PDK/libcommon/portal/jlib/* to $ install_home/portal/jlib/
Copy $ unzip_directory/PDK/libcommon/webcache/jlib/* to $ install_home/webcache/jlib/
Copy $ unzip_directory/PDK/libcommon/jlib/* to $ install_home/jlib/
- Copy $ unzip_directory/PDK/portaltools. Ear into your Solaris applications subdirectory. Usually, this directory is $ oc4j_home/J2EE/home/applications.
- Add the following to $ oc4j_home/J2EE/home/config/server. xml:
<Application name = "portaltools" Path = ".../applications/portaltools. Ear" auto_start = "true"/>
- Add the following to your Solaris web site configuration file. check the entry "<web-site Path =...> "In $ oc4j_home/J2EE/home/config/server. XML. this specifies the name and location of the Web site configuration file. for example, if it is pointing to "http-web-site.xml" file, you need to add the following entries in your $ oc4j_home/J2EE/home/config/http-web-site.xml file:
<Web-app application = "portaltools" name = "portaltools"Load-on-startup = "true"Root = "/portaltools"/>
<Web-app application = "portaltools" name = "webclipping"Load-on-startup = "true"Root = "/portaltools/webclipping"/>
<Web-app application = "portaltools" name = "omniportlet"Load-on-startup = "true"Root = "/portaltools/omniportlet"/>
<Web-app application = "portaltools" name = "providerbuilder"Load-on-startup = "true"Root = "/portaltools/builder"/>
<Web-app application = "portaltools" name = "sample"Load-on-startup = "true"Root = "/portaltools/sample"/>
- Start up the productname instance again by executing the following command from $ oc4j_home/J2EE/home directory:
Java-jar Solaris. Jar
Portal tools is now deployed. Please proceed to login ing and registering.
Logging ing and registering the providers under portal tools
Now that portal tools is deployed, you shoshould proceed to configure the individual providers before registering them with an oracleas portal instance. This can be done from the portal tools home page at the following URL:
Http: // <server >:< port>/portaltools
The home page lists the providers under portal tools. Click on each link to display the provider's test page and configure the provider.
The following links let you view a document describing how to configure the provider and register it with oracleas Portal:
- Web clipping provider
- Omniportlet provider
- Sample provider
The details about deploying your own providers and using portal tool to configure web clipping provider, omniportlet provider will be talked in the following articles. The pictures below show the test results.