Sun GlassFish Web Space Server 10.0 Administration Guide

Enabling Sharing of a Portlet

You can enable sharing of a portlet on any web site, on Facebook, and by Friends.

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

ProcedureTo Share a Portlet With Facebook

This procedure assumes that you have already added the 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.

  4. Click Facebook under Sharing.

  5. Click Get the API Key and Canvas Page URL from Facebook link and follow the instructions to get the API key and canvas page URL from Facebook.

  6. Type the API key and the canvas page URL and click Save.

  7. Access the portlet on Facebook by using the canvas page URL.

ProcedureTo Allow Sharing of a Portlet With Friends

The Friends portlet lists the Web Space Server users who are registered as your friends. You can authorize your friends to access a portlet that is on your page.

  1. Log in to Sun GlassFish Web Space Server.

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

  3. Click the Sharing tab.

  4. Click Friends under Sharing.

  5. Select the Allow Users to Share portlet With Friends option and click Save.