WebSphere

 

Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows

 

Deploy customized themes and skins

 

+

Search Tips   |   Advanced Search

 

Theme and skin JSPs are managed as part of the main IBM® WebSphere® Portal Express enterprise application and are thus part of the WebSphere Portal Express EAR file. The WebSphere Portal Express 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.

Before you start this task, make sure that all of the following is true:

  1. The administrative server of the WebSphere Application Server has been started:

    • If the portal runs in a base application server node, make sure that the administration server is running. The default name is server1.

    • If the portal runs in a Network Deployment (ND) cell, make sure that the Deployment Manager (DM) and all node agents are running.

  2. Make sure that the WebSphere Portal Express server has been stopped.

  3. You are logged in by using the WebSphere Application Server administrative cuser ID.

To deploy themes and skins in a production environment

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

    1. At a command line, change to the was_profile_root/bin directory.

    2. Invoke the wsadmin command to export the wps.ear to a temporary directory (make sure that all commands are entered on one line):

      • Windows:

        wsadmin.bat -user admin_user_id -password admin_password -c "$AdminApp export wps c:/directory/wps.ear"

      • Linux:

        ./wsadmin.sh -user admin_user_id -password admin_password -c '$AdminApp export wps directory/wps.ear'

      • i5/OS:

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

       

      where:

      • profile_root is the name of the WebSphere Application Server profile where WebSphere Portal Express is installed; for example, wp_profile.

      • admin_user_id is the administrator's user ID

      • admin_password is the administrator's password

      • directory is the temporary directory

  2. Create the /wps_expanded subdirectory.

    Use the EARExpander tool to expand the contents of the exported EAR file (make sure that all commands are entered on one line):

    • Windows:

      EARExpander.bat -ear c:\directory\wps.ear -operationDir c:\directory\wps_expanded -operation expand

    • Linux:

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

    • i5/OS:

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

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

    • HTML themes go in...

      ../wps_expanded/wps.war/themes/html

    • HTML skins go in...

      ../wps_expanded/wps.war/skins/html

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

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

    • Windows:

      EARExpander.bat -ear c:\directory\wps.ear -operationDir c:\directory\wps_expanded -operation collapse

    • Linux:

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

    • i5/OS:

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

  6. Use the wsadmin command to update the WebSphere Portal Express EAR.

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

    • Windows:

      wsadmin.bat -user admin_user_id -password admin_password -c "$AdminApp install /directory/wps.ear {-update -appname wps -nodeployejb}"

    • Linux:

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

    • i5/OS:

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

    where:

    • admin_user_id is the administrator's user ID
    • admin_password is the administrator's password
    • directory is the temporary directory

    If you receive the following error when attempting to update the WebSphere Portal Express EAR, an error may have occurred when updating the wps.ear.

    com.ibm.websphere.management.exception.AdminException: The application wps was installed using Zero Binary Copy option.

    To solve this error, restart server1 and attempt the update again, specifying the paths in the format shown in the example above.

  7. Restart WebSphere_Portal Server. In a cluster configuration, restart the cluster.

 

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 quickly without requiring you to restart WebSphere Portal Express.

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

  2. Place updated themes and skins under...

    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:

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

  • Redeploy the wps.ear file with the updated themes and skins by following the instructions in Deploy themes and skins in a production environment.

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

     

    Parent topic: Designing