In the Find a Web Clipping page, from the URL Rewriting list, choose Inline Using Web Clipping Open Transport API

5-16 Oracle Fusion Middleware Developers Guide for Oracle Portal The Search result is displayed in the Web Clipping Studio, as shown in Figure 5–18 . Figure 5–18 Searching for Information on OTN

4. Click Section. Web Clipping Studio divides the target Web page into its clippable

sections, as shown in Figure 5–19 . Figure 5–19 Sectioning the Target Web Page

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

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

Creating Content-Based Portlets with Web Clipping 5-17

7. In the Find a Web Clipping page, click OK to display the selected Web Clipping in

the Web Clipping portlet on your page. Figure 5–20 shows the Web Clipping displayed in the page. Figure 5–20 Selected Web Clipping Displayed in Web Clipping Portlet

5.4.3 Personalizing a Web Clipping Portlet

In this task, you edit the properties of the Web Clipping portlet to allow end users to display different search results in the portlet. To do this, perform the following tasks:

1. Above the Web Clipping portlet you just added, click the Edit Defaults icon, as

shown in Figure 5–21 . Figure 5–21 Clicking Edit Defaults for the Web Clipping Portlet

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. 5-18 Oracle Fusion Middleware Developers Guide for Oracle Portal ■ In the Title field, enter OTN Search. This title displays in the header of your Web Clipping portlet, as well as the pages where users can personalize parameters for the Web clipping. Figure 5–22 shows the Properties and Parameterize Inputs sections of the Find a Web Clipping page. Figure 5–22 Setting Properties for a Web Clipping

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. In the parameters table, make the following changes:

■ In the Parameters column, choose p_Query from the list. ■ In the Personalizable column, choose Param1 from the list. You can manually add more parameters in the provider.xml file if you need to. ■ In the Display Name column, enter OTN Search. ■ Make sure that Default Value displays web clipping portlet to be sure you have selected the right parameter. Figure 5–23 shows the parameters table. Figure 5–23 Specifying Parameters for User Input

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

page.

6. In the Editing Views section, click View Page.

7. In the Web Clipping portlet header, click Personalize, as shown in

Figure 5–24 . Creating Content-Based Portlets with Web Clipping 5-19 Figure 5–24 Clicking Personalize in the Web Clipping Portlet Header

8. In the page that displays, scroll down to the Inputs section. Notice that the

parameter field for the search string is labeled OTN Search, as you specified for the Display Name for this parameter. In the OTN Search field, enter a different search string. For example, enter OmniPortlet 2004, as shown in Figure 5–25 . Figure 5–25 Specifying Input for Parameters

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 5–26 . Figure 5–26 New Web Clipping Result Based on Customer Input Parameter 5-20 Oracle Fusion Middleware Developers Guide for Oracle Portal

5.5 Using Web Clipping Open Transport API

To support custom authentication methods, users can use the Web Clipping Transport API. To extend the Web Clipping transport layer to support custom authentication methods, users must perform the following implementation and deployment procedures: Implementation Users can implement their own transport classes. ■ Users can provide overrides for 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 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, users must override the addRequestHeaders methods for both the Studio and Provider HttpClientTransportLiaison implementations to add their own authentication-specific headers. For more information about implementation, see Oracle WebLogic Server Web Clipping Transport API Reference. ■ Users must compile the new subclasses and package them into a jar file. To compile the new subclasses, users can 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, users can use the following command from the classes directory: jar cvf ..mytransport.jar Where, mytransport.jar refers to t he jar file users want to create. Deployment Users must deploy the jar file to support the custom authentication method. ■ Users must place the jar file into the class path or shared library that is used by the Web Clipping producer at runtime. ■ Users must register the transport class in the web.xml file for Web Clipping producer by making the following modifications to the context parameters defined for HttpClientProviderTranportiaison 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. Creating Content-Based Portlets with Web Clipping 5-21 ■ Finally, users must restart the producer server for the changes to take effect.

5.6 Migrating from URL-Based Portlets

You can migrate URL-based portlets that are stored in a provider.xml file to Web Clipping portlets. These Web Clipping portlets will exist in the Web Clipping Repository, but you can access the portlets through pointers defined in the provider.xml file. Note that, during the migration process, no modifications will be done on the original files used by these URL-based portlets. This section describes the following tasks: ■ Section 5.6.1, Preparing for Migration ■ Section 5.6.2, Performing the Migration ■ Section 5.6.3, Post-Migration Configuration ■ Section 5.6.4, Maintaining Migrated Portlets ■ Section 5.6.5, Limitations in Migrating URL-Based Portlets

5.6.1 Preparing for Migration

Before you begin the migration, take the following steps:

1. Verify that the Web provider that contains the URL-based portlets you want to

migrate is functional. The migration process will not succeed with non-functional URL-based portlets. To verify, make sure that the URL-based portlets are used by your Portal pages and that they appear correctly.

2. Find existing URL-based portlets.

Before you run the migration tool, make sure that you know the file path to the service deployment properties file, which holds pointers to everything about the service, including the path to the provider.xml file that holds the URL services definitions. You must run the migration tool once for each service. If you have multiple services, find the entire list of service deployment properties files that will be used during migration. The location of these service deployment properties files may vary depending on individual deployment scenarios. Typically, with JPDK samples, they are located in: Domain_homeserversWLS_PORTALtmp_WL_userjpdk JPDK samples that are shipped with the Oracle Portal are located in the same directory path. The list of sample service deployment properties files include the following: ■ urlbasicauth.properties ■ urlexternalauth.properties ■ urlnls.properties ■ urlparams.properties ■ urlsample.properties 5-22 Oracle Fusion Middleware Developers Guide for Oracle Portal ■ urlssl.properties In the migration process, the service deployment properties file as well as the provider.xml file used to contain old URL-based portlets will be copied and imported into the Web Clipping application, together with all the previous customizations based on the File Preference store. Because no modifications will be done on the original files used by these URL-based portlets, you do not need to back up any of these files. They can continue to be used as URL-based portlets. 3. Depending on the types of URL-based portlets you have, you may need to rearrange them as follows: ■ Because Web Clipping does not offer parallel functionality for the XML Filter capability that URL-based portlets offer, isolate all of the URL-based portlets that use the XML Filter into a separate service deployment and provider.xml file that will not be migrated. ■ Because you may face limitations when migrating URL-based portlets that use external applications, you may decide that the migration is too costly for that subset of your URL-based portlets. In this case, you can isolate them into a separate service deployment and provider.xml file that will not be migrated. 4. Make sure that the machine where you are planning to run the migration tool has local access to the service deployment files and files that the deployment files point to, for both the URL-based portlets provider and the Web Clipping provider. 5. Make sure that both the Web Clipping Repository and the HTTP Proxy are configured, and that the proxy settings concur with those used by your deployment of URL-based portlets. If you have a proxy server that requires authentication, the Web Clipping provider must be configured with Requires Authentication enabled. Set the Login scheme to use a global log in Use Login below for all users . Check the Web Clipping Provider Test page at: http:host:portportalToolswebClippingproviderswebClipping See the Oracle Fusion Middleware Administrators Guide for Oracle Portal for more information about setting proxy authentication. 6. Shut down the WLS instance where your Portal Tools application is running. This step ensures that no modifications are made to the files that will be migrated. Do not restart the WLS instance until after the migration is completed. To shut down the WLS instance in a Portal instance, use the following command from the Oracle\Middleware\user_projects\domains\Domain Name\bin directory: stopWebLogic.cmd Domain Name refers to the domain you have configured for your Portal.

5.6.2 Performing the Migration

The migration tool parses the service deployment properties file to find the provider.xml file that contains the XML definition of the URL-based portlets to be migrated. The tool changes the Provider Definition class from URLProviderDefinition to WcProviderDefinition. For each of the URL-based portlets defined in the provider.xml file, an equivalent clipping definition is created and inserted into the Creating Content-Based Portlets with Web Clipping 5-23 Web Clipping Repository. Then, the PortletDefinition XML snippet corresponding to the portlet being migrated is replaced with a new one that uses WcPortletDefinition as its class. The replacement XML snippet contains a Clip Id that is a pointer to the newly inserted clipping definition. The new PortletDefinition XML snippet will no longer contain the same information as it did when it was a URLPortletDefinition. Namely, the migration tool uses the URL to visit as well as the headerTrimTag and footerTrimTag to generate an equivalent Web Clipping definition that will be stored within the Web Clipping Repository and only accessible from the provider.xml file through the Clip Id. The only information remaining will be the title and description. See Section 5.2.3, Setting Web Clipping Portlet Properties for instructions on modifying your clipping. To migrate portlets, take the following steps: 1. Set environment variables as follows: ■ On UNIX, set LD_LIBRARY_PATH to either the Install_homelib or Install_home lib32, depending on whether the operating system is 32-bit or 64-bit. ■ On Windows, set PATH to Install_home\bin. 2. Change to the ORACLE_HOMEportaljlib directory. 3. Use the following command to import the portlet to Web Clipping: java -Doracle.ons.oraclehome=ORACLE_HOME -jar wcwebdb.jar -import -from urlservices webclip_depprop urlsvc_depprop In the example, the parameters have the following meanings: ■ ORACLE_HOME refers to the directory where Oracle application is installed. ■ webclip_depprop refers to the path to your webClipping service deployment properties file. The path is typically: MW_HOME\user_projects\domains\DomainName\servers\WLS_PORTAL\tmp\_WL_ user\portalTools_11.1.1.1.0\kjdcke\war\WEB-INF\deployment Inst_Home refers to the location where Portal is installed. WLS_PORTAL refers to the WLS instance where your PortalTools application is deployed. ■ urlsvc_depprop refers to the path for the URL-based portlets service deployment properties file that points to URL-based portlets that you wish to migrate. For example, assume your URL-based portlets are deployed in the following directory on Windows: MW_HOME\user_projects\domains\DomainName\servers\WLS_PORTAL\tmp\_WL_ user\\portalTools_11.1.1.1.0\kjdcke\war\WEB-INF\deployment\providers

5.6.3 Post-Migration Configuration

After you migrate all of the URL-based portlets, take the following steps: 1. Start the WLS instance that hosts your provider. To start the WLS instance, use the following command: startWeblogic.cmd