Deploy J2EE assets for a partial application

The partial application option provides the ability to deploy several files into the J2EE application at the same time. This option should also be used if you want to delete any number of files that are in the J2EE application.

Note that this option should not be used if this single file is a J2EE module. J2EE modules must be deployed as an entire module.

You will use this option to deploy any combination of assets such as:

Before deploying, in the packaging phase, you built a ZIP file that contains the assets that you want to deploy. This ZIP file is used as the input to this process.

Consider the following scenario: a problem has been found in a JSP file and a controller command. The developer has made the changes and tested it in the development environment. The functional tester has also validated the change in the quality assurance environment. It is now time to deploy the changed assets to your production site. Note that regardless of whether you use the graphical or scripting tools, always back up your J2EE assets before you deploy.

In the packaging phase, you build a single ZIP file that contains:

The structure of the ZIP file would look similar to the following structure:

Deploying a partial application that contains deleted assets

Use either the WebSphere administrative console to add or update assets. However, deleting application files in a partial application update deployment scenario is accomplished by supplying a special metadata file called META-INF/ibm-partialapp-delete.props in the partial application ZIP. This file can exist at the application scope or at any embedded archive scope including modules.

Deploying using the WebSphere administrative console

  1. Backup your J2EE assets.

  2. Place the ZIP file containing your changed files either on the machine running WebSphere console or the machine running the Web browser you are using to access the WebSphere administration console.

  3. Start the WAS administration server.

  4. Launch the WebSphere console.

  5. In the WebSphere administration console, expand Applications > Enterprise Applications.

  6. From the Enterprise Applications list, select the check box next to the J2EE application for your instance. This will be WC_ instance (for example, WC_demo). Click Update.

  7. On the Preparing for Application Installation page, under the Application update options section:

    1. Select Partial application. More options, specific to a partial application deployment, display.

    2. Under Upload the new or replacement files:

      If you are typing in the directory paths, you should always use forward slashes no matter which platform you are using. You should also not prefix with a leading slash.

      • If your changed files are on the the same machine as the Web browser used to connect to the WebSphere console:

        1. Select Local file system and specify the full path and file name to the ZIP file containing all of your changed files.

        2. Click Next.

      • If your changed file is on the server that your Web browser is connected to to use the WebSphere console:

        1. Select Remote file system and specify the full path and file name to the ZIP file containing all of your changed files.

        2. Click Next.

  8. The Updating Application page displays with a confirmation message, indicating your file will be updated. Click OK.

  9. WAS saves the updates and deploys the file. On the Updating page, click Save to Master Configuration to save your changes.

Deploying using the wsadmin tool

  1. Back up your changed assets before deploying.

  2. Place the ZIP file containing your changed files on the file system of the machine running the wsadmin tool.

  3. Start the wsadmin tool.

  4. Run the following commands depending on the language you have chosen:

    • JACL

      $AdminApp update WC_ instance partialapp {-contents path to partial zip}

      $AdminConfig save

      For example: $AdminApp update WC_prod partialapp {-contents /deployments/2007-01-01a/partialApp.zip}

      $AdminConfig save

    • Jython AdminApp.update('WC_ instance', 'partialapp', '[-contents path to partial zip]')

      AdminApp.save()

      For example: AdminApp.update('WC_prod', 'partialapp', '[-contents /deployments/2007-01-01a/partialApp.zip]')

      AdminApp.save()

Related tasks

Deploy custom J2EE assets
Validate changes have been deployed for a custom Enterprise Application (EAR) file
Compiling JavaServer Page files

Related reference

Troubleshoot: Deployment