Create a Web clipping portlet
To help you perform Web clipping on sites that you want to include in 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, select Web clipping under Portlet Management in the Administration tab of the portal.
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:
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.
- HTML clipping When this method is selected, the Web clipping portlet displays 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 mouse over the element and click on it. The element will be highlighted to indicate that is has been clipped. To clear it, simply click it again. This is not supported for iFrames.
- Keep all content (default) When this method is selected, no clipping is performed on the contents from the specified URL. The contents are 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 are 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. This is not supported for iFrames.
To remove a Web clipping portlet, use the Delete capability of the Web Clipping Editor portlet. This action removes 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.
Add Client Header parameters
After creating a new Web clipping portlet, you 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.
Parent
Use Web clipping to import content