Create a Web clipping portlet

 

+
Search Tips   |   Advanced Search

 

To create a Web clipping portlet, select...

Administration | Portlet Management | Web clipping

For each Web clipping portlet that you create with the Web Clipping Editor, we can indicate the URL of the Web site being clipped and other settings that influence how the content is clipped, including the level of authentication required to access the site and whether URL rewriting is performed on the clipped output. There are three methods for clipping the contents of a page within the Web clipping portlet:

HTML clipping The Web clipping portlet will display a rendered view of the contents from the specified URL. That is, it displays it as you would see it in a browser. To select the elements of the page to clip, simply move the mouse over the element and click on it. The element will be highlighted to indicate that is has been clipped. To deselect it, simply click on it again, and the element will be unhighlighted. In order for HTML-clipping to be supported, enable transcoding by running the configuration task described below. Not supported for iFrames.

Keep all content Default. No clipping will be performed on the contents from the specified URL. The contents will be brought through untouched. This method is useful if you simply want to create a portlet to proxy some external content without filtering it.

Text clipping Allows the contents from the specified URL to be clipped based on a pair of strings whose occurrences within the content denote the boundaries of the portions of content to be retained. The pair of strings is specified by the user, the first string being the start string and the second the end string. When selected, the contents from the specified URL will be searched for literal occurrences of the start string followed by the end string. The portions of content between such occurrences are presented to the user, allowing the user to select which occurrences should be retained. Not supported for iFrames.

Access to the HTML source of the clipped document is not necessary. Once the Web clipping portlet is created, we can administer it as you would any other portlet.

To remove a Web clipping portlet, use the Delete capability of the Web Clipping Editor portlet. This will remove all relevant information. If you delete a Web clipping portlet manually, be sure to delete both the portlet itself and its associated portlet application through Portal Administration. Otherwise, you will not be able to create another Web clipping portlet using the same name.

 

Enable Transcoding technology

Transcoding technology is no longer enabled by default with WebSphere Portal. This must be enabled in order for web clipping to work. To enable or disable Transcoding technology,...

cd portal_server_root/config
./WPSconfig.sh configure-transcoding

For i5/OS...

cd portal_server_root/config
WPSconfig.sh -profileName profile_root configure-transcoding

...where profile_root is the name of the IBM WAS profile where WebSphere Portal is installed; for example, wp_profile.

To disable Transcoding technology:

cd portal_server_root/config
./WPSconfig.sh remove-transcoding

For i5/OS...

cd portal_server_root/config
WPSconfig.sh -profileName profile_root remove-transcoding

...where profile_root is the name of the IBM WAS profile where WebSphere Portal is installed; for example, wp_profile.

 

Add Client Header parameters

After creating a new Web clipping portlet, we can add parameters using Manage Portlets to specify extra headers that will be sent with each HTTP request for that clipping portlet. This is useful when the clipping portlet needs to connect to a backend Web server that requires extra information to be sent as part of the request. The following table provides required format examples for header parameters:

Header value Description
header1.name headerName
header1.value headerValue
header2.name headerName
header2.value headerValue

These name and value pairs will then be read by the clipper and sent as extra headers on EVERY HTTP request.

In the case where a clipping portlet has been deployed on a page and then the extra header parameters are added later, the portal will have to be restarted so that the clipping portlet picks up the new parameter values. If you add a header name that is already used by the clipping portlet, the newly added header will be ignored.

 

Related information

 

Parent topic:

Use Web clipping to import content