Oracle® Application Server Portal Developer's Guide
10g Release 2 (10.1.2) Part No. B14134-01 |
|
Previous |
Next |
Web Clipping is a browser-based declarative tool that enables you to integrate any Web application with OracleAS Portal. It is designed to give you quick integration by leveraging the Web application's existing user interface. Web Clipping has been implemented as a web provider using the Java Portal Developers Kit, which is a component of OracleAS Portal.
With Web Clipping, you can collect Web content into portlets in a single centralized Web page. You can use Web Clipping to consolidate content from Web sites scattered throughout a large organization.
This chapter contains the following sections:
Web Clipping allows clipping of an entire Web page or a portion of it and reusing it as a portlet. Basic and HTML-form-based sites may be clipped. Use Web Clipping when you want to copy content from an existing Web page and expose it in your portal as a portlet. The Web Clipping portlet supports:
Navigation through various styles of login mechanisms, including form- and JavaScript-based submission and HTTP Basic and Digest Authentication with cookie-based session management.
Fuzzy matching of clippings. If a Web clipping gets reordered within the source page or if its character font, size, or style changes, it will still be identified correctly by the Web Clipping engine and delivered as the portlet content.
Reuse of a wide range of Web content, including basic support of pages written with HTML 4.0.1, JavaScript, applets, and plug-in enabled content, retrieved through HTTP GET and POST (form submission).
Customization, allowing a page designer to expose input parameters that page viewers can modify when they customize the portlet. These parameters can be exposed as public parameters that a page designer can map as OracleAS Portal page parameters. This feature allows end users to obtain personalized clippings.
Integrate authenticated web content through Single Sign-On, including integration with external applications, which enables you to leverage Oracle Application Server Single Sign-On and to clip content from authenticated external Web sites.
Inline rendering, enabling you to set up Web Clipping portlets to display links within the context of the portlet. As a result, when a user clicks a link in the Web Clipping portlet, the results display within the same portlet. You can use this feature with internal and external Web sites.
Proxy Authentication, including support for global proxy authentication and per-user authentication. You can specify the realm of the proxy server and whether all users will automatically log in using a user name and password you provide, each user will log in using an individual user name and password, or all users will log in using a specified user name and password.
Migration from URL-based portlets, enabling you to migrate your URL-based portlets to Web Clipping. For more information, refer to the following article:
http://www.oracle.com/technology/products/ias/portal/html/migrating_urlservices_to_webclipping.html
Note that although the URL was valid when this document was written, the URL may change in the future. You should be redirected to the new URL page.
By default, all Web clipping definitions are stored persistently in the Oracle Application Server infrastructure database. Any secure information, such as passwords, are stored in encrypted form, according to the Data Encryption Standard (DES), using Oracle encryption technology.
To add Web page content to a portal page, you must first install, configure, and register the Web Clipping provider. Instructions are provided in the following file:
http://host:port/portalTools/webClipping/htdocs/help/configuring.webclipping.html
Then, you take the following steps:
Add the Web Clipping portlet to the portal page, as described in Section 4.2.1.
Use the Web Clipping Studio to navigate to the Web page containing the desired content, and then select the portion of the page to clip, as described in Section 4.2.2.
Set the properties of the Web Clipping portlet, as described in Section 4.2.3.
To add a Web Clipping portlet to an OracleAS Portal page:
Navigate to the Page Groups portlet. By default, the Page Groups portlet is located on the Build tab of the Portal Builder page.
In the Edit a Page section of the Page Groups portlet, click the Browse Pages icon and select the page to which you want to add the Web Clipping portlet.
Figure 4-1 shows the Page Groups portlet.
Click Edit.
In the region in which you want to add the Web Clipping portlet, click the Add Portlet icon.
Figure 4-2 shows a portion of the page.
In the Add Portlets page, navigate to the Web Clipping Portlet link and click it. The Web Clipping Portlet moves to the Selected Portlets box.
By default, the Web Clipping portlet is located in the Portal Builder page of the Portlet Repository. If you cannot find this page, use the Search field to find the portlet.
Click OK to add a Web Clipping portlet to your page.
Figure 4-3 shows the Web Clipping portlet added to your page.
To select a section of a Web page to display in the Web Clipping portlet, you use the Web Clipping Studio. Using the Web Clipping Studio, you can:
Section the chosen target page
Choose the exact portion of the Web content to clip
Preview the clipped content as a portlet
Save the clipped content as a portlet
Set portlet properties and save the updated portlet information
To select a section of a Web page to display in the Web Clipping portlet:
Above the Web Clipping portlet, click the Edit Defaults icon, as shown in Figure 4-4.
The Find a Web Clipping page is displayed.
In the URL Location field, enter the location of the starting Web page that links to the content you want to clip.
Click Start, as shown in Figure 4-5.
The Web Clipping Studio displays the page you specified, as shown in Figure 4-6.
Figure 4-6 Browsing to a Page Containing Content for a Web Clipping
Note that the URL in the browser bar changes from:
http://hostname:port/portal/page?_dad=portal&_schema=PORTAL...
To:
http://hostname:port/portalTools/webClipping...
Browse to the page that contains the content you want to clip.
As you click hyperlinks in the Web page, your navigation links are recorded.
Once you display the page that contains the content you want to clip, in the Web Clipping Studio banner, click Section, as shown in Figure 4-7.
Sectioning divides the target Web page into its clippable sections, as shown in Figure 4-8. After you click Section, you are no longer able to browse links in the displayed page. If you want to continue navigation, click Unsection in the Web Clipping Studio banner.
At the top left of the section of the Web content you want to clip, click Choose.
You can choose only one section as a clipping at a time.
Note: To increase the number of sections available from which to choose, click Section Smaller in the Web Clipping Studio banner. For example, you would click Section Smaller to drill down one level of nested tables. To decrease the number of sections available from which to choose, click Section Larger. |
Web Clipping Studio displays a preview of your chosen section. If it is the section you want, click Select in the Web Clipping Studio banner. The Web Clipping Studio displays the Find a Web Clipping page, with the properties of the clipping.
If you do not want to use the section you clipped in your portlet, click Unselect to return to the page containing the section. You can choose another section on the page, or click Unsection to navigate to another page.
Some sections may contain no data, only whitespace. For example, a Web page may contain an HTML <DIV> tag that contains no text or images. If you click Choose on a section that contains no data, Web Clipping displays a preview, but the preview correctly shows only whitespace. In this case, click Unselect in the preview page to return to the sectioned page. Then, select a section containing data.
In the Find a Web Clipping page, click OK to display the selected Web clipping in the Web Clipping portlet on your page. (You can edit default properties in the page. See Section 4.2.3 for more information.)
Figure 4-9 shows the content added to the Web Clipping portlet.
Figure 4-9 Clipped Content Added to the Web Clipping Portlet on a Portal Page
You can edit various portlet settings to change the appearance of the Web Clipping portlet and to specify how end users can interact with the portlet.
To set Web Clipping portlet properties:
Above the Web Clipping portlet, click the Edit Defaults icon. Web Clipping Studio displays the Find a Web Clipping page with a Properties section, as shown in Figure 4-10.
Figure 4-10 Properties Section of Find a Web Clipping Page
From the URL Rewriting list in the Properties section, choose Inline if you want link targets to be displayed inside the portlet, or choose None if you want link targets to be displayed in a new browser window.
In the Title field, enter a title to display in the portlet banner.
In the Description field, enter a description of the portlet.
In the Time Out (seconds) field, enter the amount of time (in seconds) for the Web Clipping provider to attempt to contact the Web page from which the content was clipped.
In the Expires (minutes) field, enter the amount of time (in minutes) that cached content is valid. Any requests for portlet content that occur within the time period you specify will be satisfied from the cache.
Once the cache period is exceeded, requests for portlet content will be satisfied by retrieving content from the portlet's Web Clipping data source. The cache will also be refreshed with this content.
If you entered any information in a form while clipping content for the Web Clipping portlet, the Parameterize Inputs section is available. Select the Click to start parameterizing check box to customize parameters associated with the Web Clipping portlet content. Then:
From the Parameters list, choose the parameters that you want to customize.
From the Customizable list, select a parameter if you want to allow end users to provide their own values for the parameters when they customize the portlet. Select None if you do not want to allow this.
In the Display Name field, enter a name to be displayed for the parameter.
In the Default Value field, enter a value to use by default for the parameter.
Section 4.4.3 provides an example of customizing parameters.
Click OK.
You can integrate an external application into a Web Clipping portlet, leveraging Oracle Application Server Single Sign-On to clip content from authenticated external Web sites. For example, if you have an account with My Oracle (an external application) that requires a login to access a particular page, you can incorporate clips from that page into a Web Clipping portlet.
To integrate an external application, take the following steps:
Set up the external application in OracleAS Portal, specifying the authentication information. Refer to the Oracle Application Server Portal Configuration Guide for more detail.
Log in to OracleAS Portal as the orcladmin user.
Navigate to the Administer External Applications portlet. (Select the Administer tab, then select the Portal subtab. In the SSO Server Administration section which is in the middle column, select Administer External Applications.)
Click Add External Application.
In the Create External Application page, in the Application Name field, enter a name for the application. For example, My.Oracle.Com.
For Login URL, enter the URL to log on to the application, for example, http://my.oracle.com/portal/page?_pageid=0,53&_dad=moc&_schema=MOC. To determine the URL, navigate to the desired URL in a browser and note the URL.
For User Name/ID Field Name, enter the field name that the external application uses for the user name. Determine the field name by viewing the source for the desired page. In this case, enter ssousername.
For Password Field Name, enter the field name that the external application uses for the password. Determine the field name by viewing the source for the desired page. In this case, enter password. OracleAS Portal uses this information in connecting to the application.
Select POST as the authentication method.
Figure 4-11 shows a portion of the Create External Application page:
Figure 4-11 Creating an External Application
In the Additional Fields section, you can enter names and values of any additional fields that are submitted with the login form of the external application. To specify the page to be redirected to after you log in, enter redirectFieldName for Field Name. For example, for My Oracle, enter a Field Value of p_requested_url. Figure 4-12 shows the Additional Fields section.
Click OK.
To test your credentials with My Oracle, in the Administer External Applications page, click the name of the application you just created. Then, in the External Application Login page, log on to the application My Oracle using your My Oracle user name and password.
In the Administer External Applications page click Close.
For more information about OracleAS Single Sign-On and External Applications, see the Oracle Application Server Single Sign-On Administrator's Guide.
For the Web Clipping portlet, create a new Web Clipping Provider:
Select the Administer tab, then select the Portlets tab.
Select Register a Provider.
In the Register Provider page, enter webClippingMyOracle for the Name and Web Clipping MyOracle for the Display Name. Enter a Timeout and Timeout Message. Select Web for the Implementation Style.
Click Next.
In the General Properties section of the Define Connection page, for the URL, enter:
http://server:port/portalTools/webClipping/providers/webClipping
Note the server:port refer to the host and port where the providers are located.
For the user's identity, select The user's identity needs to be mapped to a different name in the Web provider's application, and/or the Web provider requires an external application login for establishment of a browser session. If selecting this option, specify the external application ID below.
For External Application ID, click the List of Values icon and select the external application you registered.
Figure 4-13 shows the top part of the Define Connections page.
Figure 4-13 Specifying an External Application for a Web Clipping Provider
In the User/Session Information section, select User to send user specific information to the provider. For Login Frequency, select Once Per User Session.
Check that the proxy settings are correct. If you use a proxy server to contact the Web providers from the middle tier, enter the proxy server for Middle Tier.
If you use a proxy server to contact the Web providers from the portal repository, enter the proxy server for Portal Repository.
Click Finish.
In the Registration Confirmation page, if the registration was successful, click OK.
Add a portlet to a page, using the Web Clipping MyOracle provider that you just created:
In OracleAS Portal, navigate to the page in which you want to add the portlet (See Section 4.2.1 for information about navigating to a page.)
In the region in which you want to add the Web Clipping portlet, click the Add Portlet icon.
In the Add Portlets page, search for Web Clipping MyOracle. Click it to move it to the Selected Portlets box.
Click OK.
Section 4.2.1 describes in detail how to add a portlet.
Select a section of a page to display in the Web Clipping portlet:
Above the Web Clipping portlet, click the Edit Defaults icon.
The Find a Web Clipping page is displayed.
In the URL Location field, enter the location of the starting Web page that links to the content you want to clip. In this case, enter http://my.oracle.com.
Click Start. The Web Clipping Studio displays the page you specified.
Enter the login information for My Oracle.
Browse to the page that contains the content you want to clip. After you display the page that contains the content you want to clip, click Section in the Web Clipping Studio banner. Figure 4-14 shows the external application displayed in Web Clipping Studio.
Figure 4-14 External Application in Web Clipping Studio
At the top left of the section of the Web content you want to clip, click Choose.
Web Clipping Studio displays a preview of your chosen section. If it is the section you want, click Select in the Web Clipping Studio banner.
The Web Clipping Studio displays the Find a Web Clipping page, with the properties of the clipping, as shown in Figure 4-15.
Figure 4-15 Properties of the External Application
In the Find a Web Clipping page, click OK to display the selected Web clipping in the Web Clipping portlet on your page, as shown in Figure 4-16.
Figure 4-16 External Application Displayed in Portlet
Now, the Web clipping, even though it is from a page requiring authentication, is available in your portlet.
Note that you can only associate one external application with a provider. For each external application, you must register a new provider. Each portal user accesses the authenticated content using their user name and password for that system, not the page designer's credentials.
In this example, you use the Web Clipping portlet to add information from Portal to a portal page and you allow end users to customize their own views.
This example contains the following exercises:
Administrators can set up personal pages for all users. This exercise assumes that the administrator has enabled this functionality. In this exercise, you add the Web Clipping portlet to your personal page.
In the Edit a Page section of the Page Groups portlet, click the Browse Pages icon.
By default the Page Groups portlet is located on the Build tab of the Portal Builder page.
In the Page Group Map, expand the Personal Pages node, then expand the node for the first letter of your user name. Figure 4-17 shows the Personal Pages node.
Click Return Object next to your user name. Your personal page is displayed.
Click Edit Page.
In any portlet region, click the Add Portlets icon.
In the Add Portlets page, click the Web Clipping Portlet link.
By default, the Web Clipping portlet is located in the Portal Tools page of the Portlet Repository. If you cannot find this page, use the Search field to find the portlet.
The Web Clipping portlet is added to the Selected Portlets list. Click OK.
In this exercise, you navigate to Oracle Technology Network (OTN) and search for specific information, then select the results as the clipping for your portlet.
Above the Web Clipping portlet, click the Edit Defaults icon.
In the Web Clipping Studio's Find a Web Clipping page, in the URL Location field, enter
http://www.oracle.com/technology/products/ias/portal/index.html
Click Start. OTN displays the Oracle Application Server Portal page.
Enter a search string in the Search field at the top of the page, as shown in Figure 4-18. For this exercise, enter "web clipping portlet", then click Go.
The Search result is displayed in the Web Clipping Studio.
Click Section. Web Clipping Studio divides the target Web page into its clippable sections, as shown in Figure 4-19.
At the top left corner of the search result, click Choose.
A preview of the search result section displays.
Some sections may contain no data, only whitespace. For example, a Web page may contain an HTML <DIV> tag that contains no text or images. If you click Choose on a section that contains no data, Web Clipping displays a preview, but the preview correctly shows only whitespace. In this case, click Unselect in the preview page to return to the sectioned page. Then, select a section containing data.
Click Select to confirm that the search result section is the one you want to clip.
In the Find a Web Clipping page, click OK to display the selected Web clipping in the Web Clipping portlet on your page. Figure 4-20 shows the Web Clipping displayed in the page.
Figure 4-20 Selected Web Clipping Displayed in Web Clipping Portlet
In this exercise, you edit the properties of the Web Clipping portlet to allow end users to display a different product in the portlet:
Above the Web Clipping portlet you just added, click the Edit Defaults icon, as shown in Figure 4-21.
Figure 4-21 Clicking Edit Defaults for the Web Clipping Portlet
In the Find a Web Clipping page, modify the following items in the Properties section:
From the URL Rewriting list, choose Inline to specify that you want link targets displayed inside the portlet, rather than in a new browser window.
In the Title field, enter Portal Search. This title displays in the banner of your Web Clipping portlet, as well as the pages where users can customize parameters for the Web clipping.
Figure 4-22 shows the Properties and Parameterize Inputs sections of the Find a Web Clipping page.
Because the content displayed in the portlet was reached by entering information in the Search field on OTN, you can customize the parameters used by the search to allow end users to specify their own search string.
In the Parameterize Inputs section, select the Click to start parameterizing check box.
On the last line of the parameters table, make the following changes:
In the Parameters column, choose p_Query from the list.
In the Customizable column, choose Param1 from the list.
In the Display Name column, enter Portal Search.
Make sure that Default Value displays "web clipping portlet" to be sure you have selected the right parameter.
Figure 4-23 shows the parameters table.
Click OK to display the default search results in the Web Clipping portlet on your page.
In the Web Clipping portlet banner, click Customize, as shown in Figure 4-24.
Figure 4-24 Clicking Customize in the Web Clipping Portlet Banner
In the page that displays, scroll down to the Inputs section. Notice that the parameter field for the search string is labeled Portal Search, as you specified for the Display Name for this parameter. In the Portal Search field, enter a different search string. For example, enter OmniPortlet 2004, as shown in Figure 4-25.
Click OK.
The Web Clipping portlet now displays the results of performing a search on OTN for OmniPortlet 2004 information, as shown in Figure 4-26.
Figure 4-26 New Web Clipping Result Based on Customer Input Parameter
This section describes current limitations for Web Clipping. For information about the latest features and limitations in a release, be sure to read the Oracle Application Server Release Notes.
If the site to which you are connecting uses a lot of JavaScript to manipulate cookies or uses the JavaScript method document.write
to modify the HTML document being written out, you may not be able to clip content from the site.
URL-based portlets that have been migrated to Web Clipping do not support proxy authentication by default. This is because URL-based portlets inherently do not support proxy authentication and Web Clipping preserves the edit mode of the portlets. Their edit mode does not provide an opportunity to enter authentication information. To work around this restriction, add an empty Web Clipping portlet to the same portal and use the Web Clipping portlet Customize link to enter the user name and password for proxy authentication.
When you integrate with partner applications (through the use of mod_osso), you cannot clip directly through those partner applications in an authenticated manner. However, you can use the partner applications through the external application framework.
You cannot use the Web Clipping Portlet to clip OracleAS Portal pages. As a workaround, examine the portlet that is supplying the data and take the appropriate action:
For database provider portlets, use export/import to copy pages across portals.
For Web provider portlets, re-register the same provider in the destination portal and edit the portal manually.
For troubleshooting information, see Appendix B, "Troubleshooting OracleAS Portal".