Selecting policy sets for virtual portals

You can give each virtual portal a different look and feel by modifying the aggregator policies, or policy sets, that it uses.

About this task

The modified policy sets are placed in individual directories. The directory name can reflect the virtual portal name, but it cannot have spaces and must only contain the characters 0-9, A-Z, and a-z. The actual policy names cannot be modified between the virtual portals. For example, the policy wp_main.mlyt cannot be renamed.

Virtual portals are associated with the appropriate policy set in the mwp.properties file. Multiple virtual portals can use the same policy set. If a unique look and feel is not needed, the virtual portals can use the default policy set. The default policy set is created from the initial portal's policy set.

When working with the Mobile Portal Toolkit you will find the default policy set in the following directory: wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/policies/aggregator/.

The following instructions describe the steps needed to configure a virtual portal to use a unique policy set. An example virtual portal, vp2, is used to illustrate the process.

Procedure

  1. Copy the default policy set to a new directory.
    1. Change your working directory to wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/policies/aggregator/ where wp_profile_root is the directory where WebSphere® Portal is installed.
    2. Create a directory for the new policy set. The directory name cannot contain spaces and can include only the following characters: 0-9, A-Z, and a-z. For example:
      mkdir vp2
    3. Copy the /wp directory and all of the policy files to the new directory.
  2. Change to the new directory, /vp2, and customize the policies as needed. Be careful not to change the policy filenames or the element names in the policy files. Modify only the attributes–such as background color, font size and style, and alignment.
  3. Save the files that you modify.
  4. Change your working directory to wp_profile_root/ConfigEngine.
  5. Import the new policy set into MCS using the following command:
    AIXLinuxSolaris
    ./ConfigEngine.sh mwp-import-policies
    Windows
    ConfigEngine mwp-import-policies
  6. Open mwp.properties in a text editor.
  7. For the property mwp.virtual.portals, add the virtual portal object ID to the value. Use a comma (,) to separate virtual portals. For example:
    mwp.virtual.portals=18_8000CB1A00U5D0IKQD9PHS1002
    Note: To find the object IDs for your virtual portals, use the command
    • AIXLinuxSolaris ConfigEngine.sh list-all-virtual-portals
    • Windows ConfigEngine.bat list-all-virtual-portals
  8. Add the following property to the file and specify the policy set to use. In the following example, 18_8000CB1A00U5D0IKQD9PHS1002 is the virtual portal object ID and vp2 is the directory name you created earlier.
    mwp.vp.policyset.18_8000CB1A00U5D0IKQD9PHS1002=vp2
  9. Save your changes and close the file.
  10. Restart the portal server using the following commands:
    AIXLinuxSolaris
    wp_profile_root/bin/stopServer.sh server_name -username WAS_admin -password WAS_admin_password_value
    wp_profile_root/bin/startServer.sh server_name
    Windows
    wp_profile_root\bin\stopServer server_name -username WAS_admin -password WAS_admin_password_value
    wp_profile_root\bin\startServer server_name

    where server_name is the name of the WebSphere Application Server instance (for example, WebSphere_Portal).




Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.