Deploy customized themes and skins

 

+

Search Tips   |   Advanced Search

 

Theme and skin JSPs are managed as part of the main IBM 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 managed cell or cluster, they must be updated in the master configuration, which is managed by the deployment manager.

 

Deploy themes and skins in a production environment

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

  1. Start the administrative server (server1).

  2. Export the WebSphere Portal EAR file, wps.ear.

    If you have a cluster environment, the WebSphere Portal EAR must be exported from the WAS Network Deployment machine.

  3. Export the wps.ear to a temporary directory.

      cd was_profile_root/bin
      ./wsadmin.sh -user admin_user_id -password admin_password -c '$AdminApp export wps tmpdir/wps.ear'

    i5/OS:

      wsadmin -profileName profile_root -user admin_user_id -password admin_password -c '$AdminApp export wps tmpdir/wps.ear'

  4. Create the /wps_expanded subdirectory...

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

    i5/OS:

      EARExpander -ear tmpdir/wps.ear -operationDir tmpdir/wps_expanded -operation expand

  5. Place the updated themes and skins JSPs into the correct directory within the expanded EAR.

    HTML themes go in...

    tmpdir/wps_expanded/wps.war/themes/html

    HTML skins go in...

    tmpdir/wps_expanded/wps.war/skins/html

  6. Delete the original the wps.ear file from the directory where you initially exported it.

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

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

    i5/OS:

      EARExpander -ear tmpdir/wps.ear -operationDir tmpdir/wps_expanded -operation collapse

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

    If you have a managed cell (with or without a cluster), perform this step on the deployment manager machine.

      ./wsadmin.sh -user admin_user_id -password admin_password -c '$AdminApp install tmpdir/wps.ear {-update -appname wps -nodeployejb}'

    i5/OS:

      wsadmin -profileName profile_root -user admin_user_id -password admin_password -c '$AdminApp install tmpdir/wps.ear {-update -appname wps -nodeployejb}'

  9. Restart the wps application using the administrative console. In a managed node or cluster configuration, perform this restart using the administrative console for the deployment manager.

    1. Log in to the administrative console.

    2. Select Applications > Enterprise Applications, and scroll through the list until you locate the wps application.

    3. Select the wps application, and click Stop.

    4. After the application is fully stopped, click Start.

Updates to the configuration of a 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 as changes on a node are overwritten. When you run configuration tasks on the nodes, however, you do initiate them on the nodes but must modify the master configuration (remote connection from the node to 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 without requiring you to restart WebSphere Portal.

  1. Enable the application server to automatically check for new JSPs

  2. Place the updated themes and skins directly in the following directory:

    i5/OS:

    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.

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

    1. Back up any changes made to the themes and skins files in the following directory:

      i5/OS:

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

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

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

 

Related information