Administer > Deploy > Deploying customized assets > Customized WebSphere Commerce Enterprise Application (EAR) assets > Package custom Java EE assets


Identify and packaging J2EE assets for a single file

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

Depending on the type of file, we will take a different approach to identifying the file and relocating it for deployment; that is, we will do one of the following tasks:

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 the 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 the WebSphere Commerce development environment:


Procedure

  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 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/


Related tasks

Deploy J2EE assets for a single file

Package custom J2EE assets

Compiling JavaServer Page files


+

Search Tips   |   Advanced Search