Identifying and packaging J2EE assets for a single file
Before you deploy your changed file, you first package it in a format that WAS understands. For a single file deployment, the packaging stage is more accurately described as identifying the changed file. Depending on the type of file, you will take a different approach to identifying the file and relocating it for deployment; that is, you will do one of the following tasks:
- Collect controller commands, data beans, or Java code
- Collect store assets
- Collect assets stored outside of the WebSphere Commerce development environment workspace
The result of this package is a single file exported or identified for deployment.
If you are working with more than one file, package and deploy as a partial application. This is a more efficient strategy since a partial application requires the application to be down and restarted only once, not once per file.
Collecting controller commands, data beans, or Java code
If you are deploying any number of controller commands, data beans, or Java classes, export and package the assets as a JAR file. You cannot deploy custom commands, data beans, and Java code unless the files are first packaged into a JAR file. If your controller commands, data beans, or Java classes span multiple JAR files, build a partial application that contains all of the JAR files.
Collecting store assets
If you are deploying store assets (JSP files, HTML files, images, property files, and other store assets), export the file from your WebSphere Commerce development environment:
- Open WebSphere Commerce Developer and switch to the Project Explorer view.
- Right-click the Stores folder > Export > Export.
- In the Export wizard:
- Select File system and click Next.
- Select the resource that you want to deploy; that is, select the file that needs to be deployed.
- Select Create directory structure for files.
- In the Directory field, enter a temporary directory into which these resources will be placed. For example, enter C:\ExportTemp\singleFile
- Click Finish.
- On the file system, make the following changes:
- Rename the Stores directory to Stores.war.
- Move the contents of the WebContent directory up into the Stores.war directory. For example, move this directory and file: Stores.war\WebContent\ ConsumerDirect_name\MyNewJSPTemplate.jsp into Stores.war\ ConsumerDirect_name\MyNewJSPTemplate.jsp
- Delete the now empty WebContent directory.
- Ensure the name of the store directory, for example, ConsumerDirect, matches the name of the store on the target machine.
Collecting assets stored outside of the WebSphere Commerce development environment workspace
In WebSphere Commerce Developer, all store-related assets are stored in the Stores web module and any Java or EJB assets are stored in the Rational Application Developer workspace. Some assets are not stored in the workspace at all. For instance, XML configuration files and properties files are not stored inside the workspace; these files are used for customizing the tools framework. The following table illustrates the location in WebSphere Commerce Developer and the corresponding location inside the WebSphere Commerce EAR file:
Development environment path EAR path WCDE_installdir/xml/ xml/ WCDE_installdir/properties/ properties/ Related tasks
Deploy J2EE assets for a single file
Package custom J2EE assets
Compiling JavaServer Page files