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:
- Logic jars
- JSP files
- Configuration XML files
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 entire logic jar file that includes all existing code that is part of that JAR file, including your changed controller command .class file
- The JSP file
The structure of the ZIP file would look similar to the following structure:
- WebSphereCommerceServerExtensionsLogic.jar
- Stores.war/myStore/myPage.jsp
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
- Backup your J2EE assets.
- 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.
- Start the WAS administration server.
- Launch the WebSphere console.
- In the WebSphere administration console, expand Applications > Enterprise Applications.
- 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.
- On the Preparing for Application Installation page, under the Application update options section:
- Select Partial application. More options, specific to a partial application deployment, display.
- 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:
- Select Local file system and specify the full path and file name to the ZIP file containing all of your changed files.
- Click Next.
- If your changed file is on the server that your Web browser is connected to to use the WebSphere console:
- Select Remote file system and specify the full path and file name to the ZIP file containing all of your changed files.
- Click Next.
- The Updating Application page displays with a confirmation message, indicating your file will be updated. Click OK.
- 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
- Back up your changed assets before deploying.
- Place the ZIP file containing your changed files on the file system of the machine running the wsadmin tool.
- Start the wsadmin tool.
- 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 filesRelated reference
Troubleshoot: Deployment