Publishing External Content Using the Web Clipping Portlet
Publishing External Content Using the Web Clipping Portlet
Purpose
You might need to display information that resides outside
your portal on your portal page. Sometimes, you must consolidate content from
numerous Web sites of a large organization. The Web Clipping portlet offers
an easy and intuitive way to capture content and functionality from existing
Web sites. In this lesson, you learn to capture and display clipped Web content
as a portlet on your portal page. You also learn to customize the Web Clipping
portlet. You learn how to support parameters and implement internal portlet
navigation. You learn to create a Web Clipping portlet that accesses secure
content using Oracle Application Server Single Sign-On external application
authentication.
Web clippings are sections of existing Web content that can
be reused in OracleAS Portal, for example, a paragraph or table on existing
Web pages. The simplest form of Web clipping is the HTML code in a Web page.
However, Web clippings can also include non-HTML elements within a Web page,
such as applets or JavaScript. The Web Clipping portlet allows page designers
and content contributors to easily compose rich pages by visually selecting
portions of existing Web content and present them as portlets. This can greatly
facilitate aggregation of content from numerous Web sites.
Note:
You need to download the latest release of the OracleAS Portal Developer Kit
(PDK) from Portal
Studio to upgrade the Portal Tools applications. The PDK 9.0.4.0.2 includes
new features for OmniPortlet and Web Clipping such as new data sources and layouts,
external application integration, inline rendering of links and forms, and URL-based
Portlets Migration Kit.
Adding a Web Clipping Portlet
to an OracleAS Portal Page
The Web Clipping portlet, which is a prebuilt
portlet shipped with OracleAS Portal, offers an easy and intuitive way to capture
content and functionality from existing Web sites. The Web Clipping provider
renders the clipped Web content as a portlet on a portal page.
You can add a Web Clipping portlet to your portal
page from the Portlet Repository where it is found under Portlet Builders.
If the portal administrator has reorganized the Portlet Repository, the default
portlets may be in different locations within the Portlet Repository.
In this section, you will add a Web Clipping
portlet instance to your portal page.
1.
Access your portal.
Click the Navigator link.
2.
Access your
portal page. Your path should be Path: Page Groups > <YourName>
Oracle By Example > Pages.
3.
Click the
Edit link to the right of the <YourName>
OBE Home Page link.
4.
Click the Personal
tab.
5.
Click the Add
Portlet
icon on the region header. OracleAS Portal displays the portlet repository.
6.
Click Portlet
Builders.
Note:
If you are not using the Web Clipping portlet, which is readily available,
and have installed the Web Clipping portlet in another OracleAS Portal
instance, then you could locate your Web Clipping portlet in the Portlet
Staging Area. By default, all the newly registered providers
and portlets are available in the Portlet Staging Area in the Portlet
Repository.
7.
Click the Web
Clipping Portlet link to move it to the Selected Portlets
section.
8.
Click OK
to return to the portal page. The Web Clipping portlet is added to your
portal page.
The Web Clipping provider fetches Web clippings and creates
the Web Clipping portlet by using the Web Clipping Studio. Like a standard Web
browser, you can use the Web Clipping Studio to navigate to a Web page. You
can use the Web Clipping Studio to perform the following tasks:
Browsing for Web content
Sectioning the chosen target page
Choosing the exact portion of the Web content to clip
Previewing the clipped content of the portlet
Saving the clipped content of the portlet
Setting portlet properties and saving the updated portlet
information
In this section, you will clip a portion of content from the
Portal Center home page and publish it on your existing portal page. Using a
Web Clipping portlet, you simply navigate to the page that you want to clip.
Next, you select the clipping from the page and set the name, description, and
other properties for the clipping. The clipped content is published on your
portal page.
1.
Click the Edit icon for the Web Clipping
portlet that you just added.
2.
You need to specify the
address to the clipped content.
Enter http://portalcenter.oracle.com in the URL
Location field.
3.
Click Start.
The Web Clipping Studio tool is invoked. The Web
Clipping Studio provides the following three modes:
Browse mode:
You can navigate to the exact Web page
on the Web site to clip the desired content. Because the Web page
is active in the Web Clipping Studio, you can select any active
link on the Web page to browse that page.
Section
mode:
The content of the Web page is divided
into all possible clippable sections from which you can choose a
section to clip.
Preview
mode:
You can preview the clipped section of
the Web page if it is the one you want to select for the portlet.
4.
You will now see the Portal
Center home page within the studio, similar to a standard Web browser.
You can also navigate to other pages by using the hyperlinks on the
page.
Now, you will clip a section from the Portal Center home page. In the
top-right corner of the Web Clipping Studio page, click the Section
link. This divides the target Web page into its clippable sections.
Note: If the Portal Center site
has changed drastically, please choose any section of the Portal Center
page to clip.
Toolbar Button
Description
Back
Returns to the previous
Web page
Cancel
Returns to the Graphical
edit mode to start over
Zoom
In
Increases the depth
in the divisions of sections on the Web page, thereby increasing
the number of sections available
Zoom
Out
Decreases the depth
in the divisions of sections on the Web page, thereby decreasing
the number of sections available
Select
Selects the entire Web
page as a clipped content
Unselect
Returns to section mode
allowing you to choose a different clipping
Section
Targets the current
Web page to view in section mode to clip content from it later
Unsection
Removes the divisions
into sections of the Web page, and returns to browse mode
Forward
Returns to the next
Web page, if it exists
5.
Click the Choose
icon above the Learn about Oracle Application Server Portal 10g
(9.0.4) section. This allows you to preview the clipped content.
You can increase the granularity of the clippable
sections by clicking the Zoom In button
on the Web Clipping Studio toolbar. The Zoom
Out button decreases the granularity of the clippable sections.
6.
Click the Select
link in the top-right corner of the page to choose this Web clipping.
7.
Now, set properties for
this Web clipping.
Select Inline for the URL Rewriting
field. This option rewrites all URLs within the portlet to point back
to Portal so that all browsing within the Web Clipping Portlet remains
within Portal.
8.
Rename the Portlet
Title to Portal Center.
9.
Enter Clipped
Content from Portal Center in the Description
field.
10.
Click OK.
11.
You can
see the clipped content published on your Web Clipping portlet.
12.
Click the View Page
link in the top-right corner to preview the page.
13.
Click the Frequently
Asked Questions link in your Portal Center Web Clipping
portlet.
14.
You can see the URL content
rendered within the Web Clipping portlet.
When the source of your Web clipping changes, your Web clipping portlet
will also reflect the changes automatically.
15.
Click the Back
link on your portlet header.
16.
You can see the clipped content
on your Web Clipping portlet
17.
Click the Edit
smart link to return to the Edit mode on the page.
The behavior of Web applications can be extended with the
help of parameters. You can use parameters to customize the Web Clipping content
according to your needs. The Web Clipping Studio records all the URLs that are
directly involved in getting the source Web page and replays the navigation
on the Web Clipping portlet. All Web Clipping definitions are stored in a database.
The Web Clipping portlet retrieves the content from the source each time the
portlet is refreshed.
In this section, you add parameters to publish contextual
information in the Web Clipping portlet. First, add a Web Clipping portlet to
the Personal tab on your portal page by using the steps listed
in Adding a Web Clipping Portlet to an OracleAS Portal Page.
1.
Click the Edit icon for the Web Clipping
portlet that you just added.
2.
Enter http://oraclestore.oracle.com
in the URL Location field.
3.
Click Start.
You need to choose the store at your location.
4.
Click the English
link below United States. The Oracle Store Web page for United States
is displayed within the Web Clipping Studio.
Note:Some Web sites generate images at run time, therefore, some
images may not appear in the Web Clipping Studio but will render in
the portlet.
5.
In the Quick Search
field, enter portal.
6.
Click Go. All
products containing the name portal are displayed in the search
results.
7.
Click Section.
This divides the target Web page into its clippable sections.
Note:
The Web Clipping Studio discards any browsing operations that do not
contribute to the eventual content for the Web Clipping portlet.
8.
Click the Choose
icon to the left of the page above the Results text.
A preview of the clipped content containing the search results is
displayed.
9.
Click Select
to confirm the section that you want to clip.
10.
Select None
from the URL Rewriting list. This option does not rewrite
the URL link. Therefore, any action performed within the portlet will
take you out of OracleAS Portal into the clipped content Web site.
Clicking any links within the clipped content will refresh the portal
page to display the traversed page content.
11.
Enter Oracle
Store Product Search in the Title field.
12.
Enter
Clipped Web content
from Oracle Store in the Description
field.
13.
Change the value in the Time
Out (seconds) field to 30.
The timeout value is useful when the source site is down and the portlet
times out in a reasonable amount of time rather than waiting indefinitely.
You can set the portlet timeout value in seconds to specify the waiting
time for the portlet to render the clipped content on the portal page.
14.
You can specify the portlet
content expiry time in minutes.
Change the value in the Expires (minutes) field to 10.
This allows the portlet to use the current clipped content for 10
minutes without querying the source Web page again, thereby improving
the time taken to render the portal page.
15.
The Web clipping can be made
parameterizable, so that page viewers can customize their own views of
this Web clipping. You can also fill in some default values for these
parameters. Because the content displayed in the portlet was reached by
entering information in a form, you can customize the parameters used
by that form.
Enter the following in the Parameterize Input section
Select the Click to start parameterizing check box.
Choose kw from the Parameters list
to specify the keyword term to be searched.
Select Param1 in the Customizable
check box so that a portal user can enter custom values for the portlet
parameter.
Enter Search for
Product in the Display Name field.
Leave the Default Value as portal.
16.
Click OK.
Note: You can link each customizable
parameter in the Web Clipping portlet with the page parameters.
17.
Click the View Page
link in the top-right corner to preview the page.
18.
You can see the clipped content
on your Web Clipping portlet
19.
Click the Customize
link on the portlet header to customize your portlet parameters.
20.
In the Inputs
section, enter wireless
in the Search for Product field.
21.
Click OK.
22.
The Web Clipping portlet
displays the list of wireless products available in Oracle Store in the
United States.
Now, any new product added to Oracle Store will be reflected in your
Web Clipping portlet. This shows that the Web Clipping portlet is not
just a screen-scraping tool, but also publishes the content dynamically.
23.
Click the Edit
smart link to return to the Edit mode on the page.
Registering an External
Application with OracleAS Portal
Oracle Application Server Single Sign-On (SSO) allows various
external or partner Web application logins to be associated with a single portal
user login, thereby simplifying the collective login process. OracleAS Portal
manages to log in to external applications on behalf of the user.
You can add an external application that supports HTML form-based
authentication. The first step is to register the external application with
OracleAS Portal by providing the configuration information. The settings configured
to register an external application include the application login URL, field
names used for the user name and password fields, and the form submission method.
After you register an external application, you can store your username and
password for the application in the single sign-on password store by selecting
the Remember My Login Information for This Application option when you log in
to the application. You will be automatically logged in when you access the
external application that requires authentication.
In this section, you will be using Yahoo! Mail for the external
application.
Note:
You must have a Yahoo! Mail account to perform the tasks in this section.
1.
Click the Builder link
at the top of the page.
2.
Click the Administer
tab.
3.
Click the Administer
External Applications link in the SSO Server Administration
portlet.
Note: If you
are not able to see SSO Server Administration portlet in your Administer
page, then log in to OracleAS Portal using orcladmin login credentials.
Enter the username as orcladmin and the appropriate
password.
4.
In the Sign In page,
enter your username as orcladmin.
Enter the appropriate password for this username.
5.
Click Login.
6.
Click Add External Application
link in the Administer External Applications page.
7.
The Create External
Application page is displayed.
Provide the necessary configuration information in the External
Application Login section to register the external application
as shown in the table below:
Fields
Values
Application Name
My
Yahoo Application
Login URL
http://login.yahoo.com/config/login
User Name/ID Field Name
login
Password Field Name
passwd
The value specified in the
Application Name field is displayed in the External
Applications portlet.
8.
Select the type of authentication
method used as POST.
The authentication method specifies how your browser sends the message
data. The POST method submits the login credentials
within the body of the form and posts the data to the single sign-on
server.
9.
Click OK.
10.
Click the My Yahoo
Application link in the Edit/Delete External Application
section.
11.
The Login - My
Yahoo Application page is displayed.
In the External Application Login section, enter your
username and password to test your credentials with Yahoo! application.
12.
Ensure that the Remember
My Login Information For This Application check box is selected.
13.
Click Login.
14.
You can see the My Yahoo!
page displayed. You could see that you are logged in to the Yahoo! application.
15.
Close this window.
16.
Click Close
to close your Administer External Applications page.
The Web Clipping provider is implemented as a Web provider
of OracleAS Portal 10g
(9.0.4). It provides all the information required for the Web Clipping portlet.
The Web Clipping provider fetches external content and creates the Web Clipping
portlet by using the Web Clipping Studio. You must configure the Web Clipping
provider to define a proxy server and port that enable the provider to connect
to content outside the firewall. You can also specify a list of host names for
which the proxy will be bypassed.
Provider registration is the process by which OracleAS Portal
is informed about how the provider can be accessed. Providers are registered
through the OracleAS Portal Web user interface. Now, you will register a Web
Clipping provider with OracleAS Portal to map the Yahoo! Mail external application
to a new Web Clipping provider.
1.
Click the Navigator
link on the top right of the page.
2.
Click the Providers
tab.
3.
Click the Registered
Providers link.
4.
Click the Provider
link to register a new Web provider.
5.
The Register Provider
page is displayed. Enter the following details in the Provider