Sun Java System Portal Server 7.1 Update 1 Community Guide

Deploying the Wiki Portlet

This section includes instructions for deploying and editing the wiki portlet after 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 Tokens for Wiki Portlet for more information.

    2. Run ant customize.

      Ensure that JavaTM DB is running before running ant.

  3. Deploy the Portlets.

    To deploy, type ant auto-deploy. You can run ant wikinodeploy to test your configuration before deploying the portlet. The ant wikinodeploy command will build the WAR file and configure the database, but will not deploy the portlet.

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

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

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

ProcedureTo Change the Default Password for the Database

For each portlet using a relational database, a separate database instance is configured with a default userid and password. The default userid is portal and the default password is a random string generated during installation. Change the default password and the access permissions of the properties files containing the password.

  1. Restart Java DB.

    See Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information.

  2. Change the password for the default user, portal, by connecting to the wikidb_portal-ID database.

    For example, if you are using a GUI like SQuirrel-j, use the SQL editor to execute the following command after connecting to the database:


    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.authentication.provider',
     'BUILTIN');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.connection.requireAuthentication',
     'true');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.portal',
     'your-new-password');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.fullAccessUsers',
     'portal');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.defaultConnectionMode',
     'noAccess');
  3. Restart Java DB.

    See Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information.

  4. Verify that the password was set correctly by connecting to the wikidb_portal-ID database with the new password.

  5. For each portal instance:

    1. Refer to the web container's documentation and set the password for the jdbc/WikiDB datasource to the new password that was set in step 2.

    2. Open the PortalServer-DataDir/portals/portal-ID/portletapps/wiki/tokens.properties file and change the password value for the DB_ADMIN_PASSWORD and DB_PASSWORD properties to the new password that you set in step 2.

    3. Change the permissions for the PortalServer-DataDir/portals/portal-ID/portletapps/wiki/tokens.properties file so that it is readable and writable only by the owner.

      For example, type chmod 600 tokens.properties.

    4. Restart the web container.

ProcedureTo Include Portlets on a Wiki Page

    In order to display portlets on a wiki page, 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 other channels (or portlets) or aggregate provider and portlet channels that are 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. All portlets must be at the main wiki page in order to show the searched object from community home search results.