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:
- 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 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
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- Right-click the Stores folderExport > Export.
- In the Export wizard:
- Select General > File system and click Next.
- Click Deselect all, then select the resource that 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 workspace_dir/wc/xml/ xml/ workspace_dir/wc/properties/ properties/
Related tasks
Deploy J2EE assets for a single file
Compiling JavaServer Page files