Create a Web clipping portlet

 

+
Search Tips   |   Advanced Search

 


Overview

To help you perform Web clipping on sites that you want to include in your portlets, WebSphere Portal enables you to create Web clipping portlets to specify how you want to tailor the content of particular documents.

To create a Web clipping portlet...

Portal Administration | Portlets | Web clipping

For each Web clipping portlet that you create with the Web Clipping Editor, you 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 When this method is selected, 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 your 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.
Keep all content (default) When this method is selected, 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 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.

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

Tip: If you want 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.

 

Adding Client Header parameters

After creating a new Web clipping portlet, you may 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 headerValue
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.

See also