This lesson explains how to migrate existing URL-based portlets to Web Clipping portlets.
This lesson covers the following topics:
Place the cursor on this icon to display all screenshots. You can also place the cursor on each icon to see only the screenshot associated with it.
OracleAS Portal provides two ways to integrate content from different Web sites into a centralized portal environment:
URL-based portlets, which are implemented by using a manual, XML file-based approach
Web Clipping, which provides a declarative approach to Web content integration
The OracleAS PDK URL-based portlet framework, a part of the Oracle Application Server Portal Developer Kit (OracleAS PDK), enables you to create portlets by accessing existing content by using URLs. This utility enables you to declaratively publish both secured and public Web content as portlets. The OracleAS PDK simply takes the URL of an application, parses the content, and uses the OracleAS PDK-Java framework of OracleAS Portal to create a URL-based portlet.
Web Clipping is a comprehensive suite for Web application integration that enables clipping and scraping of Web content. The Web Clipping portlet, which is installed as part of OracleAS Portal, enables page designers and content contributors to easily compose rich pages by visually selecting portions of existing Web content and presenting them as portlets. Web Clipping enables you to aggregate content from numerous Web sites into a centralized portal environment. You can clip sections of HTML code, as well as non-HTML components such as applets or JavaScript, on a Web page and render the clipped sections as Web Clipping portlets.
The OracleAS PDK 9.0.4.0.2 provides the URL-based Portlets Migration Kit to enable portal administrators to migrate their existing URL-based portlets to Web Clipping portlets. Web Clipping is built upon a robust architecture and supports all the features and functions available with URL-based portlets. The advantages of migrating from URL-based portlets to Web Clipping portlets include:
Single and straightforward method to publish Web content
Ability to leverage the Web Clipping features to the migrated portlets
Simple method to create portlets declaratively
Intuitive user interface for business users when they need to edit the clipped Web content
Before starting this lesson, complete the following tasks:
| 1. | Complete the Installing the Oracle Application Server 10g Infrastructure lesson. |
| 2. | Complete the Installing the Oracle Application Server 10g Portal and Wireless lesson. |
| 3 . | Register the OracleAS PDK Java 9.0.4.0.2 sample providers on an OracleAS Portal instance by following the instructions provided in the Installing the PDK-Java Framework and Sample Providers article. |
| 4. | Upgrade to Portal Tools 9.0.4.0.2 or later releases by following the instructions provided in the Portal Tools: Upgrading to Release 9.0.4 and later article. The OracleAS PDK 9.0.4.0.2 includes new features for OmniPortlet and Web Clipping, such as new data sources and layouts, external application integration, inline rendering of links and forms, and URL-based Portlets Migration Kit. |
Note: You must have access to the command prompt and local file system on the machine where you are planning to run the migration tool, because the migration process is largely accomplished through file manipulation. In particular, you must have access to the files where the OracleAS Portal providers are deployed.
Note: If you have already deployed URL-based portlets and added the existing URL-based portlets to your portal, you can skip this topic. You can directly go to the Running the Migration Tool topic to perform the migration of URL-based portlets. However, the screenshots shown in this lesson may differ from what you actually see.
The OracleAS PDK URL-based sample portlets use the OracleAS PDK-Java Framework. Before performing the steps in this section, you must have successfully installed the OracleAS PDK-Java Framework and registered the sample providers.
There are three portlets available in the URL-based sample portlet provider: Google.com, MIT XML Filter, and Stardeveloper ASP portlet. To use these portlets in OracleAS Portal, you must first deploy the sample portlet provider to a Java 2, Enterprise Edition (J2EE) container. Oracle Application Server Containers for J2EE (OC4J) is the J2EE server component of Oracle Application Server. The URL-based portlets are preconfigured within the jpdk.ear file, which is a J2EE Enterprise Application Archive file. In this lesson, you use OC4J to simplify the Web provider deployment.
The provider.xml file stores information that is used by the URL provider. You can configure provider-specific information, such as portlet title and portlet description, in the provider.xml file. This XML file is used to specify the URL that is displayed in your portlet.
| 1. |
Open the provider.xml file for the URL-based portlets. You can find it in the < OC4J_HOME>\j2ee\home\applications\jpdk\jpdk\WEB-INF\providers\urlsample directory. Note: < OC4J_HOME> refers to the root directory of your OC4J installation.
|
| 2. |
Configure the proxy server settings in the provider.xml file (if required), because the URL-based portlets access URLs over the Internet. Depending on your setup, you may not need a proxy server to access external URLs. The URL-based portlet provider uses the proxy server settings that you specify in this file to connect to external Web sites. If you are using a proxy server, alter the following tags appropriately. If you are not using a proxy server, remove the following tags:
For example, you can edit the provider.xml file to provide the proxy information, as shown below:
|
| 3. |
Modify the <stylesheet> tag to point to the correct location of the XML style sheet for the XML Filter portlet. It is located in the < OC4J_HOME>\j2ee\home\applications\jpdk\jpdk\htdocs\urlsample directory. For example, you can edit the provider.xml file to provide the style sheet information, as shown below:
|
Note: If you have already deployed URL-based portlets and added the existing URL-based portlets to your portal, you can skip this topic. You can directly go to the Running the Migration Tool topic to perform the migration of URL-based portlets. However, the screenshots shown in this lesson may differ from what you actually see.
The OracleAS PDK URL-based sample portlet provider is now deployed. Next, you can test whether the portlet provider is properly configured with OC4J.
| 1. | Access the provider test page by using the following URL:
http://< host name> :< port>/ jpdk/providers/urlsample where < host name> and < port> are the host name and port number of the HTTP listener for your target OC4J instance.
Note: In an OracleAS installation with Web Cache installed, the port number should be the Web Cache listener port, for example 7777. In a stand-alone OC4J installation, the default HTTP port number is 8888.
|
| 2. |
Review the content of the displayed test page. This page lists the portlets that are included with the URL provider that has a service name of urlsample.
|
Note: If you have already deployed URL-based portlets and added the existing URL-based portlets to your portal, you can skip this topic. You can directly go to the Running the Migration Tool topic to perform the migration of URL-based portlets. However, the screenshots shown in this lesson may differ from what you actually see.
After deploying the URL provider and its portlets, you must register the provider with OracleAS Portal. The provider registration is the process by which OracleAS Portal is informed about the access details of the provider. Providers are registered through the OracleAS Portal Web user interface. After you register a provider, the provider and its portlets are available in the Portlet Repository. They are also listed in the OracleAS Portal Navigator.
| 1. |
Access your OracleAS Portal instance. Click the Login link in the Login portlet.
|
||||||||||||
| 2. |
Enter your username and password. Click Login.
Note: If you do not know your username or password, contact your portal administrator.
|
||||||||||||
| 3. |
Click the Administer tab.
|
||||||||||||
| 4. |
Click the Portlets sub-tab.
|
||||||||||||
| 5. |
In the Remote Providers portlet, click the Register a Provider link.
Note: To register your provider, you must have Manage or Edit privileges on providers. If you do not have these privileges, you must request them from your portal administrator.
|
||||||||||||
| 6. |
On the Provider Information page, provide the following details:
Click Next.
|
||||||||||||
| 7. |
The portal and the provider communicate with each other over HTTP. Before using the provider and its portlets, you must specify the access details of the provider. On the Connection page, specify the following provider information in the appropriate fields:
|
||||||||||||
| 8. |
Click Finish.
|
||||||||||||
| 9. |
You should receive a message indicating that your registration is successful. Click OK.
|
Note: If you have already deployed URL-based portlets and added the existing URL-based portlets to your portal, you can skip this topic. You can directly go to the Running the Migration Tool topic to perform the migration of URL-based portlets. However, the screenshots shown in this lesson may differ from what you actually see.
URL-based sample portlets can now be added to pages just like any other portlet in the Portlet Repository.
In this section, you add a URL-based sample portlet to your portal page.
| 1. |
Click the Navigator link.
|
| 2. |
Access your portal page. To help you perform the steps in this section, a page group named Migrating URL Portlets and a page named URL Portlets Page within that page group have already been created. Note: To learn more about creating page groups and pages, see the Building the Portal Site lesson. Your path should be Path: Page Groups > <Migrating URL Portlets> Pages.
|
| 3. |
Click the Edit link to the right of the URL Portlets Page link.
|
| 4. |
Click the
Add Portlet
|
| 5. |
Click the Portlet Staging Area link.
Note: By default, all the newly registered providers and portlets are available in the Portlet Staging Area in the Portlet Repository.
|
| 6. |
Click the URL Sample Portlets provider link.
|
| 7. |
Click the Google.com Portlet link to move it to the Selected Portlets area.
|
| 8. |
Click the ASP Portlet link to move it to the Selected Portlets area.
|
| 9. |
Click OK to return to the portal page.
|
| 10. |
Note that the URL-based sample portlets have been added to your portal page. You can see your URL-based sample Google portlet, as shown below. Note that the Refresh link is not available in the Portlet Header for the URL-based portlets.
|
| 11. |
You can see your URL-based sample ASP portlet, as shown below. Note that the content rendered by the URL-based portlet is unorganized and poorly formatted.
|
Note: If you have already upgraded to Portal Tools 9.0.4.0.2 or later releases by following the instructions provided in the Portal Tools: Upgrading to Release 9.0.4 and later article, you can skip this topic.
The Web Clipping provider is implemented as a Web provider of OracleAS Portal 10g (9.0.4). It provides all the information required to publish external Web content within the Web Clipping portlet. The Web Clipping provider fetches the content selected by the user in the Web Clipping Studio, and renders it inside the Web Clipping portlet.
You must configure the Web Clipping provider by defining a proxy server and port that enable the provider to connect to content sources outside the firewall. You can also specify a list of host names for which the proxy will be bypassed. To configure the Web Clipping provider, follow the instructions in the Configuring the Web Clipping Provider document.
You can access the Web Clipping Provider Test page by using the following URL:
http://<
host name>
:<
port>
/portalTools/webClipping/providers/webClipping
The Web Clipping Provider Test page enables you to know whether the provider is functioning properly.
Next, you must register a Web Clipping provider with OracleAS Portal.
| 1. |
Click the Navigator link at the top right of the page.
|
||||||||||||
| 2. |
Click the Providers tab.
|
||||||||||||
| 3. |
Click the Registered Providers link.
|
||||||||||||
| 4. |
Click the Provider link to register a new Web provider.
|
||||||||||||
| 5. |
The Register Provider page is displayed. Enter the following details in the Provider Information section:
|
||||||||||||
| 6. |
Click Next.
|
||||||||||||
| 7. |
Enter the Web Clipping Provider URL in the URL field. The URL format is
|
||||||||||||
| 8. |
In the User/Session Information section, select the User option button to send user-specific information to the provider. Select Once Per User Session from the Login Frequency list.
Make sure that you have specified the correct proxy settings in the Proxy Settings section of the page. OracleAS Portal uses the proxy server settings that you specify in this section to connect to the Web Clipping provider.
|
||||||||||||
| 10. |
Click Finish.
|
||||||||||||
| 11. |
Click OK to complete the Web provider registration.
|
The migration process involves writing configuration data from the URL-based portlet's configuration files into the Web Clipping portlet's configuration files. During the migration process, the service deployment properties file and the provider.xml file are copied into the Web Clipping application, along with the existing customizations to these files. Because the original files used by the existing URL-based portlets are not modified, there is no need to back up any of these files before beginning the migration process. After completing the migration process, the new Web Clipping portlets are available in the Web Clipping Repository.
The migration tool parses the service deployment properties file to find the corresponding provider.xml file, which contains the XML definition of the URL-based portlets to be migrated. For each of the URL-based portlets defined in the provider.xml file, an equivalent clipping definition is created and inserted into the current Web Clipping Repository. The migration tool changes the XML snippet of the provider definition class from URLProviderDefinition to WcProviderDefinition. For each migrated URL-based portlet, the replacement XML snippet contains a clip ID, which is a pointer to the newly inserted clipping definition. The new portlet definition XML snippet no longer contains the same information as it did when it was a URL portlet definition.
You must run the migration tool once for each URL-based portlet. The location of these service deployment properties files that is used for the URL-based portlets may vary depending on individual deployment scenarios. For the shipped URL-based sample portlets, you can find the service deployment properties files in the < OC4J_HOME>/j2ee/home/applications/jpdk/jpdk/WEB-INF/deployment directory.
The service names of the URL-based portlet providers are:
urlsample - demonstrates the basic capabilities of URL-based portlets
urlparams - demonstrates how to build a parameter-driven URL-based portlet provider
urlnls - demonstrates how to build a URL-based portlet provider that performs character set conversion to correctly display multibyte characters, such as Chinese, Japanese, Korean, and Arabic
urlbasicauth - demonstrates how to build a URL-based portlet provider that displays data from a source that is secured by using basic authentication
urlexternalauth - demonstrates how to build a URL-based portlet provider that displays data from a password-protected external application
| 1. |
Before you initiate migration, ensure that no other users have modified the files that you intend to migrate. Shut down the OC4J instance in your Oracle Application Server instance or the stand-alone OC4J instance where your Portal Tools application is running. To shut down a stand-alone OC4J instance, you can use the following command from the < OC4J_HOME>\j2ee\home directory: java -jar admin.jar ormi://< host name> admin admin_password -shutdown Note: Do not restart OC4J until the migration has finished.
To shut down the OC4J instance in your OracleAS instance, execute the following command from the < INSTALL_HOME>/opmn/bin directory: opmnctl stopproc gid="< OC4J_INSTANCE>" For example, if your Portal Tools application is running in the OC4J_Portal instance, enter
Note: < OC4J_INSTANCE> refers to the OC4J instance where your Portal Tools application was deployed. < INSTALL_HOME> refers to the OracleAS installation home, which is the root directory of your OracleAS installation.
|
| 2. |
Open the command window. If you are using a stand-alone OC4J instance, change your current directory to < OC4J_HOME>/portal/jlib .
If you are using OC4J in your OracleAS installation, change your current directory to < INSTALL_HOME>/portal/jlib .
|
| 3. |
Execute the following command: java -jar wcwebdb.jar -import -from urlservices < WEBCLIP_SVC_DEP_PROPS> < URLSVCS_SVC_DEP_PROPS> where <
WEBCLIP_SVC_DEP_PROPS>
refers to the path to your Web Clipping service deployment properties file.
<
URLSVCS_SVC_DEP_PROPS>
refers to the path to the URL-based portlets service deployment properties file pointing to URL-based portlets that you want to migrate.
For example, you can see the command that is executed on a stand-alone OC4J instance.
|
| 4. |
Look for the Importing into Web Clipping was successful” message to check that your URL portlet has been imported.
Note: If you encounter any problems or errors during the migration process, please see the Limitations and Troubleshooting section in the Migrating From URL-Based Portlets to Web Clippings Portlets document in Portal Center.
|
| 5. |
After migrating all the URL-based portlets, you must verify that the migration is successful. First, restart the OC4J instance that hosts your provider. To start a stand-alone OC4J instance, execute the following command from the < OC4J_HOME>\j2ee\home directory: java -jar oc4j.jar -err errors.log
Note: The errors.log file is an arbitrary file where the standard error messages are written. You can access the errors.log file to identify the errors that might have occurred when you started the OC4J instance.
To start the OC4J instance in your OracleAS instance, execute the following command from the < INSTALL_HOME>/opmn/bin directory: opmnctl startproc gid="< OC4J_INSTANCE>"
|
Next, you must update the provider information in all OracleAS Portal instances where your URL-based portlet provider was previously registered.
| 1. |
Access the Portal Navigator page.
|
| 2. |
Access the Registered Providers. Your path should be Path: Providers > Registered Providers.
|
| 3. |
Click the Edit Registration link to the right of the URL Sample Portlets link.
|
| 4. |
Click the Connection tab.
|
| 5. |
Update the provider URL value to: http://< host name> :< port> /portalTools/webClipping/providers
Note: If you registered your URL-based portlet provider by using a provider URL that contained the Service ID, you must update the provider URL to: http://< host name> :< port> /portalTools/webClipping/providers/urlsample
|
| 6. |
Click OK.
|
| 7. |
Click the Refresh link to update the provider registration.
|
Access your portal page to check whether the URL-based portlets that were added to your page were successfully migrated.
| 1. |
Click the Page Groups tab.
|
| 2. |
Click the Migrating URL Portlets link.
|
| 3. |
Click the Pages link.
|
| 4. |
Click the Edit link to the right of the URL Portlets Page link.
|
| 5. |
You can now see your migrated URL-based sample Google portlet, as shown below. Note that the Refresh link is available by default in the Portlet Header for the Web Clipping portlet.
|
| 6. |
You can see your migrated URL-based sample ASP portlet, as shown below. Note the difference in the rendering of content in the Web Clipping portlets. You can see that the style sheet has been applied and the content is better organized.
|
| 7. |
Access the test page for the migrated URL-based sample portlets by using the following URL:
|
| 8. |
Click the Edit link to edit the Google.com portlet.
|
| 9. |
Note that you can alter the clipping for the migrated URL-based portlet without modifying the provider.xml file.
|
In this lesson, you should have learned how to migrate existing URL-based portlets to Web Clipping portlets.
For more information about how to clip content by using the Web Clipping portlet, please refer to the Publishing External Content Using the Web Clipping Portlet OBE lesson.
For more information about OracleAS Portal, please visit Oracle Portal Center Home.
If you have questions or comments, please post them in the Oracle by Example discussion forum on the Oracle Technology Network.
Place the cursor on this icon to hide all screenshots.
| |
||
| Copyright © 2004, Oracle Corporation. All rights reserved. | Contact Us Legal Notices and Terms of Use Privacy Statement | |
