Administer > Deploy > Publish a store archive
Publish a store archive using the publishstore utility
Although the primary method of publishing a store archive is through the Administration Console, you can also publish a store archive using the command line. Only one store can be published at a time.
- If you change the Web application Context path, ensure that it matches the path defined in the WebSphere Commerce Server.
- When you open a store from Administration Console, you are logged into the store with the same user name and password that you used to log into Administration Console. If you change the password in the store, you are also changing it for Administration Console. Instead, to test the features in the store, including changing the password, save the site address, close all browser windows, then log on to the store again. For more information, see Limitations when using multiple browsers windows.
- If you are logged in as the Site Administrator, you cannot browse a store based on the advanced B2B direct starter store. Instead create a new user that belongs to the default organization, then browse the store.
- If you plan to make changes to the JSP files after publishing your store, you should disable servlet caching in the WebSphere Application Server.
If you are using WebSphere Commerce development environment, the servlet caching is disabled by default.
Procedure
- Ensure that you have Site Administrator access.
- At a command line, change the directory to WC_INSTALL /bin.
- Issue the publishstore command using valid parameters for the store archive.
You need to copy the following files under StoreAssetsDir to the corresponding store directory, after using the command line to publish the ConsumerDirect or B2BDirect store. For ConsumerDirect, these files need to be copied (for B2BDirect, substitute "B2BDirect" for "ConsumerDirect"):
- PROFILE_HOME\installedApps\ cell_name\ WC_EAR\StoreAssetsDir to PROFILE_HOME\installedApps\ cell_name\ WC_EAR\ConsumerDirect
- PROFILE_HOME\installedApps\ cell_name\ WC_EAR\WEB-INF\classes\StoreAssetsDir to PROFILE_HOME\installedApps\ cell_name\ WC_EAR\WEB-INF\classes\ConsumerDirect
- PROFILE_HOME\installedApps\ cell_name\ WC_EAR\WEB-INF\stores\StoreAssetsDir to PROFILE_HOME\installedApps\ cell_name\ WC_EAR\WEB-INF\stores\ConsumerDirect
- PROFILE_HOME\installedApps\ cell_name\ WC_EAR\xml\tools\stores\StoreAssetsDir to PROFILE_HOME\installedApps\ cell_name\ WC_EAR\xml\tools\stores\ConsumerDirect
- PROFILE_HOME\installedApps\ cell_name\ WC_EAR\tools\stores\StoreAssetsDir to PROFILE_HOME\installedApps\ cell_name\ WC_EAR\tools\stores\ConsumerDirect
- While the store archive is being published, we will receive updates on the publishing status.
- Open Internet Explorer. Go to the following Web address:
http://host_name/webapp/wcs/stores/servlet/storedir/index.jsp
Your store displays.
- Optional: Compile your JavaServer Page files. Compiling the JSPs files in the site or store before launching it will significantly reduce the amount of time needed to load each store page. As a result, it is recommended that you batch compile your store or sites JSP files after publishing a store archive.
- If you publish the advanced B2B direct store archive, stop and restart the commerce server before viewing the store, or the registration page will not display properly. For more information, see Start and stop WebSphere Commerce.
- In order to prevent unnecessary exceptions displaying, delete the SendTransactionMsg job from the scheduled jobs. For more information, see Delete a scheduled job.
- Optional: In order to enable caching in the starter stores, merge the cachespec.xml file from the following directory:
- WAS_HOME\samples\dynacache\ businessmodel
- WAS_HOME/samples/dynacache/ businessmodel
with the cachespec.xml file...
- WC_EAR/Stores.war/WEB-INF
You must edit the existing cachespec.xml file in the WEB-INF directory with the changes in the first file, rather than replace it.
In WebSphere Commerce development environment, caching is turned on by default, so you do not need to complete this step if you are publishing in the WebSphere Commerce development environment.
- If you are running the Web server on a separate node than the WebSphere Commerce node, complete the following steps after publishing a store archive:
- Stop the Web server.
- Copy the following directory from the WebSphere Commerce machine to the Web Server machine in the same location:
- WC_EAR/Stores.war
- Start the Web server.
- In a clustered environment, synchronize all cluster members after publishing any store archive. In a clustered environment, it may take some time for the newly published store assets to be completely propagated to all the nodes in the cluster after the store has finished publishing.
What to do next
- If you are publishing the version 7 store into the same environment as a previously migrated version 5.6.1 store, you see a warning message. The migrated version 5.6.1 environment has the JSTL Expression Language (EL) set to ignore.
Your application currently has the JSTL Expression Language (EL) feature disabled, any starter stores that are ready for this feature will not function correctly. Please refer to the online documentation on how to correct this behavior. Do to continue with the store publish?
To use the new store, first enable EL; then publish the store.
Changing this setting allows the version 7 store to function correctly, but will prevent the 5.6.1 store from working until you migrate your JSP files, described in step c. To enable EL:
- Edit the following two files:
- WAS_HOME/profile/profile_name/installedApps/cell_name/EAR_name/Stores.war/WEB-INF/web.xml
- WAS_HOME/profile/profile_name/config/cells/cell_name/applications/EAR_name/deployments/application_name/Stores.war/WEB-INF/web.xml
In each of the files, remove the following XML:
<jsp-property-group> <url-pattern>*.jsp</url-pattern> <el-ignored>true</el-ignored> </jsp-property-group>
- Restart the WebSphere Commerce server.
- To use the old WebSphere Commerce version 5.6.1 store and the new WebSphere Commerce, version 7.0 store concurrently, also migrate the old 5.6.1 store JSP files in the development environment.
To migrate the JSP files, see:Migrate JSP files.
- Publish storefront assets and store configuration files by copying to the WebSphere Commerce Server
In order to publish the storefront assets by copying them directly to the WebSphere Commerce Server, the Web assets (HTML, JSP files, images, and graphics) must be copied to the Stores Web application document root. The resource bundles or properties files must be copied to the application's properties path. The store configuration files must be copied to the appropriate locations under the stores or tools Web modules.