Oracle Portal Developer Kit (PDK) Introduction and Installation

xiaoxiao2021-03-06  43

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 includes two wizards -. Java Portlet & Oracle PDK Java Portlet The Java Portlet wizard allows you to build portlets based on the standards (eg WSRP, JSR 168).. 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 ProvidersIf you are installing on a stand-alone OC4J instance and you do not have OracleAS Enterprise Manager (OEM) installed and configured, follow the steps in this section.

Installing or Upgrading the PDK-Java Framework

Stop your OC4J instance, if it is running, using the following command: java -jar admin.jar ormi: // localhost admin $ admin_password -shutdown Within your OC4J home directory, create the following directories if they do not exist, or make Backup Copies if The Do Exist:

$ OC4J_HOME / jlib $ OC4J_HOME / portal / jlib $ OC4J_HOME / webcache / jlib Notes: $ OC4J_HOME is the root directory of your OC4J 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 included 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:

EnSure Oc4j Is Running (Use the Command in The Previous Section To Start IT 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 / PDKSTRUTSWHERE:

$ Admin_password is the OC4J administration password you set on installation $ application_name is the unique name that should 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 Unsing The Following URL:

Http: // $ Host: $ port / jpdk / providers / scheve

WHERE:

$ Host and $ port are the host name and port number of the HTTP listener for your target OC4J instance. In an OracleAS installation with webcache installed, $ port should be the Web Cache listener port (eg 7777). In a standalone OC4J installation, The Default Http Port Number IS 8888.

This page lists the portlets that are included 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 Included with the PDK-Java V2 Sample Providers Application Are:

sample - demonstrates many of the basic capabilities of the PDK-Java v2portlet 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 t he 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 - Demonstrate 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 display 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 ApplicationThe 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 Oracle 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 (ORACLEAS Portal Home Page), Click ON Register Portlet Provider within the portlet called provides. Fill Out Provider Information for The Sample.

Name: SampleWebProvider Display Name: Sample Web Provider Timeout: 100 Timeout Message: Application Timed Out Implementation Style: Web Click on the next button to enter the Web Provider specific information Enter the Web Provider location and Service NameURL: http: // $ host: $ Port / JPDK / Provider Service Name: URN: Sample Scroll Down To The USER / Session Information Section and Specify The Login Frequency

Login Frequency: Once Per User Session Click on The Finish Button 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 itd.

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 Success Installed and Setup The Web Provider Samples.

Installing the Portal Tools

This Section AssalOAn OC4J Server Installed and Configured. If you do not have an ion..............

To Deploy the application manually:

Shut down the OC4J instance.To shut down OC4J, you can use the following command from $ OC4J_HOME / j2ee / home directory: java -jar admin.jar ormi: // : / admin -shutdown 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 OC4J instance in OracleAS, $ IAS_HOME) or to the root directory of your OC4J installation (if installing on a standalone OC4J 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 $ instalall_home / portal / jlib / copy $ unzip_directory / pd k / libcommon / webcache / jlib / * to $ INSTALL_HOME / webcache / jlib / copy $ unzip_directory / pdk / libcommon / jlib / * to $ INSTALL_HOME / jlib / Copy $ unzip_directory / pdk / portalTools / portalTools.ear into your OC4J applications subdirectory . Usually, this directory is $ OC4J_HOME / j2ee / home / applications Add the following to $ OC4J_HOME / j2ee / home / config / server.xml:. add the fol your oc4j Web site configuration file. Check the entry"

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: Start the OC4J instance again by executing the following command from up $ OC4J_HOME / J2EE / Home Directory: Java -jar Oc4j.jarportal Tools is now deployed. please proceed to configuring and re gistering.

Configuring and registering the providers Under Portal Tools

Now that Portal Tools is deployed, you should 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: // : / 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.

转载请注明原文地址:https://www.9cbs.com/read-53229.html

New Post(0)