Sun GlassFish Web Space Server 10.0 Administration Guide

ProcedureTo Share a Portlet With Other Web sites

Consider the example of sharing the Calendar portlet on a web site created by you. This procedure assumes that you have already added Calendar portlet to your page.

  1. Log in to Sun GlassFish Web Space Server.

  2. Click the Configuration button among the edit controls for the portlet.

    In this example, click the Configuration button among the edit controls for the Calendar portlet.

  3. Click the Sharing tab.

    Figure 4–10 The Code for Sharing the Portlet on Any Web site

    The Code for Sharing the Portlet on Any Website

  4. Select and copy the code for sharing the portlet on any web site.

  5. Select the Allow Users to add Calendar to Any Web site option.

  6. Click Save.

  7. Open the source code of any web site and copy the sharing code into it, then save changes to add the portlet to the web site.

    For example:

    1. Open the Mozilla Classic browser

    2. Choose Edit Page from the File menu.

    3. Click HTML Source.

    4. Paste the copied code into the page.

      Figure 4–11 Adding the Sharing Code to the Source code of a Web site

      Adding the Sharing Code to the Source Code of a Web site

    5. Click Save.

    6. In the dialog box that appears, type a title and click OK.

    7. Save the page on your desktop.

      In this example, you can name the page as Calendar Sharing.

    8. Open the page in a web browser.

      Note that the Calendar portlet is added to the page.

      Figure 4–12 The Portlet Added to the Web site

      The Portlet Added to the Web site