Identifying and packaging J2EE assets for a single file

Before you deploy your changed file, you first package it in a format thatWebSphere Application Server understands. For a single file deployment, the packaging stage is more accurately described as identifying the changed file.

About this task

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.

Note: 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 your 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, you must 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:


  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Right-click the Stores folderExport > Export.
  3. In the Export wizard:
    1. Select General > File system and click Next.
    2. Click Deselect all, then select the resource that you want to deploy; that is, select the file that needs to be deployed.
    3. Select Create directory structure for files.
    4. In the Directory field, enter a temporary directory into which these resources will be placed. For example, enter C:\ExportTemp\singleFile
    5. Click Finish.
  4. On the file system, make the following changes:
    1. Rename the Stores directory to Stores.war.
    2. 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
    3. Delete the now empty WebContent directory.
    4. Ensure the name of the store directory, for example, ConsumerDirect, matches the name of the store on the target machine.
  5. 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
    workspace_dir/wc/xml/ xml/
    workspace_dir/wc/properties/ properties/