Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter
11g Release 1 (11.1.1)
E10148-04
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

36 Creating Content-Based Portlets with Web Clipping

Web Clipping is a publishing portlet that enables you to integrate any web application with your WebCenter application. Web Clipping is designed to give you quick integration by leveraging the existing user interface of a web application. 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 includes the information you are required to know to use Web Clipping in your Oracle JDeveloper environment. For information about how to use Web Clipping at runtime, refer to the "Working with the Web Clipping Portlet" chapter in the Oracle Fusion Middleware User's Guide for Oracle WebCenter.

This chapter includes the following sections:

For information about additional Web Clipping portlet producer configuration such as repository and proxy settings and producer security, see Appendix F, "Additional Portlet Configuration."

You can find information about developing different types of portlets and information about producers and other portlet technologies in Chapter 29, "Overview of Portlets."

36.1 Introduction to Web Clipping

With Web Clipping you can clip an entire web page or a portion of it and reuse it as a portlet. You can clip basic and HTML-form-based sites. Use Web Clipping when you want to copy content from an existing web page and expose it in your WebCenter application as a portlet.

Web Clipping supports the following features:

36.2 Adding Web Clipping to Your Application

You can add a Web Clipping portlet to a JSP document created through JDeveloper. For more information, see Chapter 34, "Consuming Portlets." The Web Clipping portlet producer is included in:

To add a Web Clipping portlet to your application:

  1. In JDeveloper, start Integrated WLS . For information, see Section 3.8, "Using Integrated WLS."

  2. In JDeveloper, register the Web Clipping producer. For more information, see Section 34.2.3, "How to Register an Oracle PDK-Java Portlet Producer."

    During this step, you must provide the endpoint URL, for example:

    http://localhost:7101/portalTools/webClipping/providers/webClipping
    

    You can choose to register the Web Clipping portlet producer from the WLS_Portlets managed server or Integrated WLS.

    When the producer is registered, portlets become available either in the Application Resources panel or the Resource Palette.

  3. From the Application Resources panel or the Resource Palette, drag the Web Clipping portlet onto your .jspx page. For more information, see Section 34.3, "Adding Portlets to a Page."

    If you are using a PanelCustomizable or ShowDetailFrame component, then drag the portlet on top of that component instead of af:form. In the Structure pane, the Web Clipping portlet must display under the PanelCustomizable or ShowDetailFrame component. In the Page Editor, the portlet must display inside the PanelCustomizable or ShowDetailFrame component.


    Note:

    When you add an instance of Web Clipping to your page in JDeveloper, open the Property Inspector for the portlet and ensure that the AllModesSharedScreen and RenderPortletInIFrame properties are set as follows:
    • AllModesSharedScreen is set to false to display the Customize and Personalize in full page size. If you do not set this property to false, then when you edit the Web Clipping portlet at runtime, the text displayed on the page may be distorted.

    • RenderPortletInIFrame is set to true to display the Web Clipping in its own inline frame (IFRAME) in the View mode.


  4. Right-click the .jspx page and choose Run.

    The Web Clipping portlet displays in your default browser.

  5. Customize the Web Clipping portlet to define its contents. For information, see the "Working with the Web Clipping Portlet" chapter in the Oracle Fusion Middleware User's Guide for Oracle WebCenter.


    Note:

    To clip SSL-enabled web sites, you must add certificates of those sites to the certificate store. You are not required to add certificates of SSL-enabled web sites that use Equifax, VeriSign, or Cybertrust certificates because these certificates are included in the default certificate store.

    For information about adding certificates, see Section F.3.3.1, "Adding Certificates for Trusted Sites."


36.3 Integrating Authenticated Web Content Using Single Sign-On

You can leverage Oracle Single Sign-On to integrate content from external web sites that require authentication, into a Web Clipping portlet.

To integrate an external application that requires authentication:

  1. Open your custom WebCenter application in JDeveloper.

  2. Register the external application, specifying the authentication information. For more information, see Section 37.2.3.1.1, "Registering an External Application in Oracle JDeveloper."

  3. Register the Web Clipping producer. For information, see Section 34.2.3, "How to Register an Oracle PDK-Java Portlet Producer."

    While registering the producer by using the Register Oracle PDK-Java Portlet Producer wizard, on the Specify Connection Details page, select the Associate Producer with External Application checkbox, and from the list of values, select the external application that you just registered. The Enable Producer Sessions checkbox gets selected automatically.

    Figure 36-1 shows the external application named MyOracleSupport associated with a Web Clipping producer.

    Figure 36-1 Associating a Web Clipping Producer with an External Application

    Description of Figure 36-1 follows
    Description of "Figure 36-1 Associating a Web Clipping Producer with an External Application"

  4. Add the Web Clipping portlet from the producer that you just registered to a .jspx page.

  5. Right-click the .jspx page and choose Run.

  6. If you did not specify shared or public credentials for the external application, then the portlet contains an Update login information link. Click this link.

  7. Enter your credentials, and then click OK to log in to the external web site.

    Figure 36-2 shows the login screen of an external application named MyOracleSupport.

    Figure 36-2 Logging into the Integrated External Application

    Description of Figure 36-2 follows
    Description of "Figure 36-2 Logging into the Integrated External Application"

  8. Click the Actions icon on the header of the Web Clipping portlet, and select Customize.

    The Find a Web Clipping page displays, with the default URL for the external application displayed in the URL Location field (Figure 36-3).

    Figure 36-3 Finding a Web Clipping

    Description of Figure 36-3 follows
    Description of "Figure 36-3 Finding a Web Clipping"

    You can now select any section of a web page that you intend to display in your Web Clipping portlet. For information about how to customize a Web Clipping portlet, see the "Working with the Web Clipping Portlet" chapter in the Oracle Fusion Middleware User's Guide for Oracle WebCenter.

    After you clip the required page of the external application, the web clipping, even though it is from a page requiring authentication, is available in your portlet.

36.4 Advanced Features of Web Clipping

Web Clipping supports certain advanced features. You can configure custom authentication methods by using the Web Clipping Transport API and rewrite image links to use a resource proxy.

This section includes the following subsections:

36.4.1 Using the Web Clipping Transport API

To support custom authentication methods, you can use the Web Clipping Transport API. To extend the Web Clipping transport layer to support custom authentication methods, you must perform several implementation and deployment procedures.

This section includes the following subsections:

36.4.1.1 Implementing the Web Clipping Transport API

If you want to support a custom authentication method, such as Kerberos, you must first implement your own transport classes.

To implement custom transport classes:

  1. Override two use cases of the oracle.portal.wcs.transport.http.HttpTransportLiaison interface.

    In Web Clipping, this interface is used to abstract the HTTP transport layer. By default, the two use cases of this interface are manifested by the following implementations:

    • HttpClientStudioTransportLiaison, which handles HTTP transport in Web Clipping Studio mode

    • HttpClientProviderTransportLiaison, which handles HTTP transport in Web Clipping Producer show mode

    To support more authentication methods, you must override the addRequestHeaders methods for both the Studio and Provider HttpClientTransportLiaison implementations to add your own authentication-specific headers. For information, see Oracle WebLogic Server Web Clipping Transport API Reference.

  2. Compile the new subclasses and package them into a JAR file.

    For example, to compile the new subclasses, use the following command:

    javac -classpath path_to_wcejar -d classes/

    Where, path_to_wcejar refers to the path to the wce.jar file.

    To create the JAR file, for example, run the following command from the classes directory:

    jar cvf ../mytransport.jar

    Where, mytransport.jar refers to the JAR file users want to create.

36.4.1.2 Deploying the Web Clipping Transport API

After implementing the new transport classes, you must deploy the JAR file to support the custom authentication method.

To deploy the JAR file:

  1. Place the JAR file into the class path or shared library that is used by the Web Clipping producer at runtime.

  2. Register the transport class in the web.xml file for the Web Clipping producer by making the following modifications to the context parameters defined for HttpClientProviderTransportLiaison and HttpClientStudioTransportLiaison:

    • Change the parameter value for oracle.webclipping.provider.TransportLiaisonClass to the name of the new class extended from the HttpClientProviderTransportLiaison class.

    • Change the parameter value for oracle.webclipping.studio.TransportLiaisonClass to the name of the new class extended from the HttpClientStudioTransportLiaison class.

  3. Restart the producer server for the changes to take effect.

36.4.2 Rewriting Image Links to Use a Resource Proxy

Web Clipping enables you to rewrite image links to use a resource proxy. To enable this feature, you must add the following entry to the web.xml file of the Web Clipping producer:

<env-entry>
    <env-entry-name>oracle/webclipping/rewriteImageLink</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>false</env-entry-value>
</env-entry>

36.5 Current Limitations of Web Clipping

When you use Web Clipping, you should be aware of the following limitations.

36.6 Troubleshooting Web Clipping

This section provides information to help you troubleshoot problems you may encounter while using Web Clipping.

Encountered "x" at line n, column n. Was expecting one of : "x", "y" ...

Parser error message written to the log file.

Problem

The web content displayed in the Web Clipping portlet contains invalid HTML or JavaScript.

Solution

This is a site-specific issue, not a Web Clipping error. Contact the site's administrator for assistance.