bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Portlet Features and Functionality

 Previous Next Contents Index View as PDF  

The Web Page Portlets

You can use the Web page portlets to look up various kinds of information. This topic contains information about the following portlets:

 


Dictionary Portlet

The Dictionary portlet allows you to look up the definition of a word by connecting to the Merriam-Webster Web site. It is a simple JavaServer Page (JSP) application.

Java source: none

JSP source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/portlets/dictionary

Note: You do not need to log in to use this portlet.

  1. From the Home page, click the Web tab.

  2. As shown in Figure  4-1, enter a word in the word field, and then click the Look Up button.

    Figure 4-1 Dictionary Portlet


     

    A new window opens that displays the word definition, as shown in Figure  4-2.

    Figure 4-2 Dictionary Window


     

  3. After you are done looking at the window, close it.

 


Quote Portlet

The Quote portlet allows you to look up a stock information from the Yahoo! Finance Web site. It a simple JSP application.

Java source: none

JSP source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/portlets/quote

Note: You do not need to log in to use this portlet.

  1. From the Home page, click the Web tab.

  2. As shown in Figure  4-3, enter a symbol in the ticker symbol field, and then click the Quote button.

    Figure 4-3 Quote Portlet


     

    A new window opens that shows the selected quote information, as shown in Figure  4-4.

    Figure 4-4 Quote Window


     

  3. After you are done looking at the window, close it.

 


WebSearch Portlet

The WebSearch portlet allows you to search the Web through Yahoo!, Excite, or Google. It is a simple JSP application.

Java source: none

JSP source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/portlets/search

Note: You do not need to log in to use this portlet.

  1. From the Home page, click the Web tab.

  2. As shown in Figure  4-5, enter a search term in the field, and then click the Search button.

    Figure 4-5 WebSearch Portlet


     

    A new window opens showing the search results in the selected search engine, as shown in Figure  4-6.

    Figure 4-6 WebSearch Window


     

  3. After you are done looking at the window, close it.

 


WorldNews Portlet

The WorldNews portlet links to various news agencies on the internet and displays the new stories they publish. It retrieves news stories based on user preference and displays them as links. This portlet demonstrates the use of the WebLogic Server Extensible Markup Language (XML) and Extensible Stylesheet Language (XSL) JSP tags.

Java Source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/src/examples/sampleportal/worldnews

JSP Source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/portlets/worldnews

To learn how to configure the WorldNews portlet, complete the following steps:

  1. Log in as any visitor.

  2. From the Home page, click the Web tab. Figure  4-7 shows the WorldNews Portlet before it has been configured.

    Figure 4-7 WorldNews Portlet—Not Configured


     

  3. Click the Edit button in the titlebar. The portlet maximizes and is now editable, as shown in Figure  4-8.

    Figure 4-8 WorldNews Portlet—Editable


     

  4. Select a Topic and a Template from the drop-down lists, click the Save button, and then click the Finished button. The portlet now shows the topics from the selected news source, as shown in Figure  4-9.

    Figure 4-9 WorldNews Portlet—Configured


     

  5. To view a news story, click one of the links. The story is displayed in a new browser page, as shown in Figure  4-10.

    Figure 4-10 WorldNews Story Window


     

  6. After you are done looking at the window, close it.

 


Bookmarks Portlet

The Bookmarks portlet provides a way for you to store the names and URLs of Web sites. After a bookmark is created, clicking the link opens the site in a new browser window. This portlet is implemented through Enterprise JavaBeans (EJB) 2.0 entity beans.

Java Source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/src/examples/sampleportal/bookmark

JSP Source: <BEA_HOME>/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/portlets/bookmark

In this section, you will learn how to configure the Bookmarks portlet.

  1. Log in as any visitor.

  2. After the Home page appears, click the Web tab. The Bookmarks portlet appears, as shown in Figure  4-11.

    Figure 4-11 Bookmarks Portlet—No Saved Bookmarks


     

  3. Click Add Bookmarks. The portlet expands, as shown in Figure  4-12.

    Figure 4-12 Bookmarks Portlet—Adding a Bookmark


     

  4. Enter the name and URL of a Web site you frequently visit, and then click the Add Bookmark button. The portlet shows the added bookmark, as shown in Figure  4-13.

    Figure 4-13 Bookmarks Portlet—Bookmarks Added


     

  5. Add another bookmark, and then click the Finished button. The portlet returns to its original size and displays the new bookmarks, as shown in Figure  4-14.

    Figure 4-14 Bookmarks Portlet—Saved Bookmarks


     

  6. Click one of the bookmark links. The Web site opens in a new window, as shown in Figure  4-15.

    Figure 4-15 Bookmarks Window


     

  7. After you are done looking at the window, close it.

 

Back to Top Previous Next