Skip Headers
Oracle® Application Server Portal Developer's Guide
10g Release 2 (10.1.2)
Part No. B14134-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

4 Building Content-Based Portlets with Web Clipping

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:

4.1 What Is Web Clipping?

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:

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.

4.2 Adding Web Page Content to a Portal Page

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:

  1. Add the Web Clipping portlet to the portal page, as described in Section 4.2.1.

  2. 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.

  3. Set the properties of the Web Clipping portlet, as described in Section 4.2.3.

4.2.1 Adding a Web Clipping Portlet to a Page

To add a Web Clipping portlet to an OracleAS Portal page:

  1. Navigate to the Page Groups portlet. By default, the Page Groups portlet is located on the Build tab of the Portal Builder page.

  2. 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.

  3. Click Edit.

  4. 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.

    Figure 4-2 Adding a Portlet to a Page

    Description of pdg_wc_addportlet.gif follows
    Description of the illustration pdg_wc_addportlet.gif

  5. 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.

  6. Click OK to add a Web Clipping portlet to your page.

    Figure 4-3 shows the Web Clipping portlet added to your page.

    Figure 4-3 Web Clipping Portlet Added to a Page

    Description of pdg_wc_result1.gif follows
    Description of the illustration pdg_wc_result1.gif

4.2.2 Selecting a Section of a Web Page to Display in the Web Clipping Portlet

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:

  • Browse for Web content

  • 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:

  1. Above the Web Clipping portlet, click the Edit Defaults icon, as shown in Figure 4-4.

    Figure 4-4 Editing Default Settings

    Description of pdg_wc_editdef.gif follows
    Description of the illustration pdg_wc_editdef.gif

    The Find a Web Clipping page is displayed.

  2. In the URL Location field, enter the location of the starting Web page that links to the content you want to clip.

  3. 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

    Description of pdg_wc_url2.gif follows
    Description of the illustration pdg_wc_url2.gif

    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...
    
    
  4. 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.


    Note:

    Any browsing operations that do not contribute to the eventual Web clipping will be discarded. Only the significant browsing operations are recorded for later playback during the show mode; any discarded links are not visited.

    For any Web sites that require HTTP Basic or Digest Authentication, a form is displayed that requests user name and password information. This encoded authentication information is recorded as part of the browsing information.


  5. 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.

    Figure 4-7 Sectioning the Target Web Page

    Description of pdg_wc_selsect.gif follows
    Description of the illustration pdg_wc_selsect.gif

    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.

    Figure 4-8 Sectioned Target Web Page

    Description of pdg_wc_section.gif follows
    Description of the illustration pdg_wc_section.gif

  6. 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.

  7. 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.

  8. 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

    Description of pdg_wc_result2.gif follows
    Description of the illustration pdg_wc_result2.gif

4.2.3 Setting Web Clipping Portlet Properties

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:

  1. 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

    Description of pdg_wc_prop1.gif follows
    Description of the illustration pdg_wc_prop1.gif

  2. 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.

  3. In the Title field, enter a title to display in the portlet banner.

  4. In the Description field, enter a description of the portlet.

  5. 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.

  6. 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.

  7. 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:

    1. From the Parameters list, choose the parameters that you want to customize.

    2. 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.

    3. In the Display Name field, enter a name to be displayed for the parameter.

    4. 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.

  8. Click OK.

4.3 Integrating Authenticated Web Content Using Single Sign-On

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:

  1. Set up the external application in OracleAS Portal, specifying the authentication information. Refer to the Oracle Application Server Portal Configuration Guide for more detail.

    1. Log in to OracleAS Portal as the orcladmin user.

    2. 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.)

    3. Click Add External Application.

    4. In the Create External Application page, in the Application Name field, enter a name for the application. For example, My.Oracle.Com.

    5. 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.

    6. 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.

    7. 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.

    8. 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

      Description of pdg_wc_create_extapp.gif follows
      Description of the illustration pdg_wc_create_extapp.gif

    9. 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.

    10. Click OK.

    11. 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.

  2. For the Web Clipping portlet, create a new Web Clipping Provider:

    1. Select the Administer tab, then select the Portlets tab.

    2. Select Register a Provider.

    3. 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.

    4. Click Next.

    5. 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.

    6. 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.

    7. 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

      Description of pdg_wc_ea.gif follows
      Description of the illustration pdg_wc_ea.gif

    8. In the User/Session Information section, select User to send user specific information to the provider. For Login Frequency, select Once Per User Session.

    9. 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.

    10. Click Finish.

    11. In the Registration Confirmation page, if the registration was successful, click OK.

  3. Add a portlet to a page, using the Web Clipping MyOracle provider that you just created:

    1. 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.)

    2. In the region in which you want to add the Web Clipping portlet, click the Add Portlet icon.

    3. In the Add Portlets page, search for Web Clipping MyOracle. Click it to move it to the Selected Portlets box.

    4. Click OK.

    Section 4.2.1 describes in detail how to add a portlet.

  4. Select a section of a page to display in the Web Clipping portlet:

    1. Above the Web Clipping portlet, click the Edit Defaults icon.

      The Find a Web Clipping page is displayed.

    2. 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.

    3. Click Start. The Web Clipping Studio displays the page you specified.

    4. Enter the login information for My Oracle.

    5. 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

      Description of pdg_wc_chooseoracle.gif follows
      Description of the illustration pdg_wc_chooseoracle.gif

    6. At the top left of the section of the Web content you want to clip, click Choose.

    7. 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

      Description of pdg_wc_findoracle.gif follows
      Description of the illustration pdg_wc_findoracle.gif

    8. 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

      Description of pdg_wc_oracle.gif follows
      Description of the illustration pdg_wc_oracle.gif

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.

4.4 Example: Adding a Web Clipping That Users Can Customize

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:

4.4.1 Exercise: Adding a Web Clipping Portlet to a Personal Page

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.

  1. 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.

  2. 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.

    Figure 4-17 Expanding Page Group Map Nodes

    Description of pdg_wc_pgmap.gif follows
    Description of the illustration pdg_wc_pgmap.gif

  3. Click Return Object next to your user name. Your personal page is displayed.

  4. Click Edit Page.

  5. In any portlet region, click the Add Portlets icon.

  6. 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.

  7. The Web Clipping portlet is added to the Selected Portlets list. Click OK.

4.4.2 Exercise: Selecting a Clipping in OTN

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.

  1. Above the Web Clipping portlet, click the Edit Defaults icon.

  2. 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.

  3. 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.

    Figure 4-18 Searching for Information on OTN

    Description of pdg_wc_search.gif follows
    Description of the illustration pdg_wc_search.gif

  4. Click Section. Web Clipping Studio divides the target Web page into its clippable sections, as shown in Figure 4-19.

  5. Figure 4-19 Sectioning the Target Web Page

    Description of pdg_wc_choose.gif follows
    Description of the illustration pdg_wc_choose.gif

  6. 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.

  7. Click Select to confirm that the search result section is the one you want to clip.

  8. 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

Description of pdg_wc_wc2003.gif follows
Description of the illustration pdg_wc_wc2003.gif

4.4.3 Exercise: Customizing a 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:

  1. 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

    Description of pdg_wc_wc2003ed.gif follows
    Description of the illustration pdg_wc_wc2003ed.gif

  2. 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.

    Figure 4-22 Setting Properties for a Web Clipping

    Description of pdg_wc_prop.gif follows
    Description of the illustration pdg_wc_prop.gif

  3. 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.

  4. 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.

  5. Figure 4-23 Specifying Parameters for User Input

    Description of pdg_wc_parms.gif follows
    Description of the illustration pdg_wc_parms.gif

  6. Click OK to display the default search results in the Web Clipping portlet on your page.

  7. 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

    Description of pdg_wc_wc2003cust.gif follows
    Description of the illustration pdg_wc_wc2003cust.gif

  8. 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.

    Figure 4-25 Specifying Input for Parameters

    Description of pdg_wc_input.gif follows
    Description of the illustration pdg_wc_input.gif

  9. 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

    Description of pdg_wc_newsearch.gif follows
    Description of the illustration pdg_wc_newsearch.gif

4.5 Current Limitations for Web Clipping

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.

For troubleshooting information, see Appendix B, "Troubleshooting OracleAS Portal".