Sun Java System Portal Server 7.1 Community Sample Guide

Chapter 3 Installing and Configuring Shared Events Portlet

This chapter includes instructions for installing and configuring the shared Events portlet manually after the Sun Java System Portal Server software installation.

Deploying the SharedEvents Portlet

ProcedureTo Install and Configure SharedEvents Portlet

Before You Begin

Configure the back-end services and gather the required information as outlined in Chapter 2, Configuring Back-end Services.

  1. Create the portlet WAR file.

    To create the WAR file:


    Note –

    After Portal Server software has been installed, the Shared Events application will be under the PortalServer-base/portletapps/sharedevents directory. If Portal Server has been configured, the shared events application will be in PortalServer-DataDir/portals/portal-ID/portletapps/sharedevents directory.


    1. Edit the tokens.properties file to specify customizable parameters for the shared events portlet.

      See Appendix D, Tokens for Shared Events Portlet for more information.

    2. Run ant customize.

  2. Load SSO Adapter Template.

    Change directories to PortalServer-DataDir/portals/portal-ID/portletapps/sharedevents/src/conf directory and type ant -f config.xml to load the SSO Adapter configuration.

  3. Deploy the Portlets.

    1. Create a file containing the password of the amadmin user. For example, type, echo mypassword >/tmp/ampasswd.

    2. Type PortalServer-base/bin/psadmin deploy-portlet -u amadmin -f /tmp/ampassword -p portal-ID -i myInstance -g --userinfofile FULL-PATH-TO-userInfoMapping.properties FULL-PATH-TO-sharedevents.war-FILE.

    3. Restart the container.

  4. Add the Display Profile data to the templates.

    The Shared Events portlet must be added to the Community templates to show up in new communities (created after the application has been installed). The template files are located at PortalServer-DataDir/portals/portal-ID/communitytemplates/ by default. Add the DP to the member.xml file in the template's directory.

    For Shared Events, do the following:

    1. Add your new channel to the available ones.

      <Available>
      ....
      <Reference value="%COMMUNITY_CONTAINER%/Sharedevents"/>
      </Available>
    2. Add your new channel to the selected ones.

      <Selected>
      ....
      <Reference value="%COMMUNITY_CONTAINER%/Sharedevents"/>
      </Selected>
    3. Add the channel definition.

      <Channels>
      ....
      <Channel name="Sharedevents" provider="__Portlet__sharedevents.sharedevents">
      	<Properties>
      		<String name="title" value="Community Calendar Events"/>
      		<String name="description" value="Community Events Portlet"/>
      		<String name="width" value="thick"/>
      		<String name="__Portlet__ps.communityId" value="|DUMMY"/>
      		<String name="__Portlet__community.calendar.config" value="|DUMMY"/>
      		<Collection name="__Portlet__PreferenceProperties">
      			<Collection name="default">
      				<String name="ps.communityId" value="|DUMMY"/>
      				<String name="community.calendar.config" value="|DUMMY"/>
      			</Collection>
      			<Collection name="isReadOnly">
      				<Boolean name="ps.communityId" value="false"/>
      				<Boolean name="community.calendar.config" value="false"/>
      			</Collection>
      		</Collection>
      		<Collection  name="userInfoDescriptions">
      			<Collection name="timezone">
      				<String name="en-US" value="Preferred User Time Zone"/>
      			</Collection>
      		</Collection>
      	</Properties>
      </Channel>
      </Channels>
  5. Restart the web container.

  6. Login and verify that the service channel is displayed on your desktop.

    1. Go to http://HOST:PORT/portal/dt and select Community Sample.

    2. Login as test/test and create a new community. Then log out.

    3. Re-login to the Community Sample portal as test/test.

      The Shared Events portlet will be displayed.