Deploy customized themes and skins

 


Contents

  1. Overview
  2. Deploy themes and skins in debugging and testing environments
  3. Deploy themes and skins in a production environment

 


Overview

Theme and skin JSPs are managed as part of the main WebSphere Portal enterprise application and are thus part of the WebSphere Portal EAR file. The WebSphere Portal EAR file must be updated and redeployed when adding new themes and skins. Failure to do this could cause the custom themes and skins to be deleted when the EAR file is subsequently updated. To update and redeploy the EAR file with the new themes and skins, follow the instructions in this section.

When customized themes and skins are deployed into the cluster, they must be updated in the cluster master configuration, which is managed by the deployment manager.

 


Deploy themes and skins in development and testing environments

This approach is suited to development and test environments because it enables you to debug and test updated themes and skins quickly without requiring you to restart WebSphere Portal.

  1. Enable the appserver to automatically check for new JSPs

  2. Place the updated themes and skins directly under...

    WAS_ROOT/installedApps/nodename/wps.ear/wps.war

    In a clustered environment, place the updated themes and skins under this directory on each node.

  3. Debug, update, and test the updated themes and skins.

    Place the updated themes and skins directly under...

    WAS_ROOT/installedApps/nodename/wps.ear/wps.war

  4. Back up any changes made to the themes and skins files under...

    was_root/installedApps/nodename/wps.ear/wps.war

  5. Disable automatic JSP reloading, if you enabled it in step 1.

  6. Redeploy the wps.ear file with the updated themes and skins

  7. Verify that the themes and skins are working as expected.

  8. Redeploy the wps.ear file with the updated themes and skins

    After you are satisfied that the themes and skins are working as designed and will not undergo further changes, incorporate the updated themes and skins in the wps.ear file to prevent accidental overwriting by an older wps.ear file.

  9. Verify that the themes and skins are working as expected.

  10. Disable automatic JSP reloading, if you enabled it in step 1.

 


Deploy themes and skins in a production environment

This approach does not require the enabling of automatic JSP reloading and does not affect the WebSphere Portal run-time performance. Because of this, it is the recommended way to deploy themes and skins in a production environment.

  1. Export the WebSphere Portal EAR file according to your network configuration. If you have a cluster environment, the WebSphere Portal EAR must be exported from the Network Deployment machine.

    1. Change directories to the WebSphere Application Server or Network Deployment bin directory, for example,...

      C:\WebSphere\AppServer\bin C:\WebSphere\DeploymentManager\bin

    2. Invoke the wsadmin command to export the wps EAR file to a temporary directory (verify all commands are entered on one line):

      ./wsadmin.sh -user admin_user_id -password instance -c '$AdminApp export wps /tmp/wps.ear'

      where:

      • admin_user_id is the administrator's user ID
      • instance is the administrator's password

  2. Create the...

    C:\Temp\wps_expanded

    ...directory for Windows or the /tmp/wps_expanded directory for Unix. Use the EARExpander tool to expand the contents of the exported EAR file (verify all commands are entered on one line):

    ./EARExpander.sh -ear /tmp/wps.ear -operationDir /tmp/wps_expanded -operation expand

  3. Place the updated themes and skins JSPs into the correct directory within the expanded EAR. For example, in Windows:

    • HTML themes go in C:\Temp\wps_expanded\wps.war\themes\html\

    • HTML skins go in C:\Temp\wps_expanded\wps.war\skins\html\

  4. Use the EARExpander command to collapse the EAR directory back into an EAR file:

    ./EARExpander.sh -ear /tmp/wps.ear -operationDir /tmp/wps_expanded -operation collapse

  5. Use the wsadmin command to update the WebSphere Portal EAR.

    If you have a cluster environment, update the EAR in the deployment manager to synchronize the update across each node in the cluster.

    ./wsadmin.sh -user admin_user_id -password instance -c '$AdminApp install /tmp/wps.ear {-update -appname wps}'

    where:

    • admin_user_id is the administrator's user ID
    • instance is the administrator's password

  6. Restart WebSphere Portal. In a cluster configuration, restart WebSphere Portal on each node.

Updates to the configuration of a WebSphere Portal cluster must occur on the deployment manager and be resynchronized with the other nodes in the cluster. If updates are made to individual nodes in the cluster, the updates will be lost when the master configuration on the deployment manager resynchronizes with the nodes again.

Theme Builder Portlet

Download from Portlet catalog. Works with 5.1. Control of theme and skin basics.

 

See also

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.