Sun Java System Portal Server 7.1 Community Sample Guide

Chapter 5 Deploying and Editing the Wiki Portlet

This chapter contains the following sections:

Deploying the Wiki Portlet

This section includes instructions for deploying and editing the wiki portlet after the Portal Server installation. After Portal Server is installed, portlets (available for deployment) are in the PortalServer-base/portletapps/portletname directory. If Portal Server has been configured, the portlet application will be in PortalServer-DataDir/portals/portal-ID/portletapps/portletapp directory. If Portal Server has not been configured, you must manually copy the files to the PortalServer-DataDir/portals/portal-ID/portletapps/portletapp directory before deploying the portlet.

ProcedureTo Deploy the Portlet

  1. Log in to the Portal Server host and change directories to where the portlet application is located.

    The wiki portlet is in the PortalServer-DataDir/portals/portal-ID/portletapps/wiki directory.

  2. Create the portlet WAR file.

    To create the WAR file:

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

      See Appendix B, Tokens for Wiki Portlet for more information.

    2. Run ant customize.

      Ensure that JavaTM DB is running before running ant.

  3. Deploy the Portlets.

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

    2. Type /opt/SUNWportal/bin/psadmin deploy-portlet -u amadmin -f /tmp/ampassword -p myPortal -v -i myInstance -g --userinfofile FULL-PATH-TO-userInfoMapping.properties FULL-PATH-TO-wiki.war-FILE.

    3. Restart the container.

  4. Log in and verify that the wiki portlet is deployed.

    1. Go to http://HOST:PORT/portal/dt and select sample where you deployed the wiki portlet.

    2. Log in to the sample and view the portlet.

ProcedureTo Enable Wiki Portlet to Display Channels and/or Portlets

    The wiki portlet must be the first selected element of a DynamicAggregationContainer. The display profile of the Developer Sample desktop and of the sample wiki community include such a container. The wiki portlet can display and aggregate any channel or portlet that is in the available list of the DynamicAggregationContainer. If a channel is not in the available list, it will not appear on the page with no error or other indication. This allows the wiki portlet to include different channels for different users based on their display profiles.

Wiki Preferences

The wiki portlet includes the following preferences that can be modified from the Portal Server management console:

wikiTemplate

Specifies the name of the JSP wiki template used by this wiki portlet. The Portal Server software includes two of these: a full page template called wikicommunity and a rearranged version used by smaller wiki portlets called wikiportlet.

wikiPage

Specifies the name of the default wiki page for this wiki portlet

editorType

Specifies the type of editor used by this wiki portlet. Values can be text or HTML. A text wiki portlet uses a simple text editor, whereas an HTML wiki uses a WYSIWYG HTML editor.

editorOptions

Specifies the HTML editor plug-ins used in this wiki. This is specified only when editorType is HTML. Valid values are: PortletPicker, Stylist, CharacterMap, ContextMenu, FullScreen, ListType, SuperClean, TableOperations.

availablePortlets

Specifies the list of channel names (either portlets, or provider channels) which this wiki portlet allows the user to select from when placing a portlet on the page. Note that only channels in the corresponding DynamicAggregationContainer available list will actually be displayed. Typically, these two lists would contain the same channels.