Publishing 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.

Important:
  1. If you change the Web application Context path, you must ensure that it matches the path defined in the WebSphere Commerce Server.
  2. 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 your password in the store, you are also changing it for Administration Console. Instead, to test the features in the store, including changing your 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.
  3. WebSphere Commerce Enterprise If you are logged in as the Site Administrator, you cannot browse a store based on the Deprecated featureadvanced B2B direct starter store. Instead create a new user that belongs to the default organization, then browse the store.
  4. If you plan to make changes to your JSP files after publishing your store, you should disable servlet caching in the WebSphere Application Server.

    WebSphere Commerce Developer If you are using WebSphere Commerce development environment, the servlet caching is disabled by default.

Procedure

  1. Ensure that you have Site Administrator access.
  2. At a command line, change the directory to WC_installdir /bin.
  3. Issue the publishstore command using valid parameters for your store archive.
    Note: You need to copy the following files under StoreAssetsDir to the corresponding store directory, after using the command line to publish the Deprecated featureConsumerDirect or B2BDirect store. For Deprecated featureConsumerDirect, these files need to be copied (for B2BDirect, substitute "B2BDirect" for Deprecated featureConsumerDirect):
    • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\ConsumerDirect
    • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\WEB-INF\classes\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\WEB-INF\classes\ConsumerDirect
    • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\WEB-INF\stores\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\WEB-INF\stores\ConsumerDirect
    • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\xml\tools\stores\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\xml\tools\stores\ConsumerDirect
    • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\tools\stores\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\tools\stores\ConsumerDirect
  4. While the store archive is being published, you will receive updates on the publishing status.
  5. Open Internet Explorer. Go to the following Web address:
    http://host_name/webapp/wcs/stores/servlet/storedir/index.jsp  

    Your store displays.

  6. Optional: Compile your JavaServer Page files. Compiling the JavaServer Pages (JSP) files in your 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.
  7. WebSphere Commerce Enterprise If you publish the Deprecated featureadvanced B2B direct store archive, you must stop and restart the commerce server before viewing the store, or the registration page will not display properly. For more information, see Starting and stopping WebSphere Commerce.
  8. In order to prevent unnecessary exceptions displaying, delete the SendTransactionMsg job from the scheduled jobs. For more information, see Deleting a scheduled job.
  9. Optional: In order to enable caching in the starter stores, you must merge the cachespec.xml file from the following directory:
    • Windows WAS_installdir\samples\dynacache\ businessmodel
    • For IBM i OS operating systemSolarisLinuxAIX WAS_installdir/samples/dynacache/ businessmodel
    with the cachespec.xml file in the following directory:
    • WC_eardir/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.

    WebSphere Commerce DeveloperIn 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.

  10. If you are running your Web server on a separate node than the WebSphere Commerce node, complete the following steps after publishing a store archive:
    1. Stop the Web server.
    2. Copy the following directory from the WebSphere Commerce machine to the Web Server machine in the same location:
      • WC_eardir/Stores.war
    3. Start the Web server.
  11. WebSphere Commerce EnterpriseWebSphere Commerce ProfessionalIn a clustered environment, you must 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 your 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. Refer to the online documentation on how to correct this 
    behavior. Do you want to continue with the store publish?
    To use the new store, first enable EL, then publish the store.
    Note: Changing this setting allows your version 7 store to function correctly, but will prevent your 5.6.1 store from working until you migrate your JSP files, described in step c.
    To enable EL:
    1. Edit the following two files:
      • WAS_installdir/profile/profile_name/installedApps/cell_name/EAR_name/Stores.war/WEB-INF/web.xml
      • WAS_installdir/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> 
    2. Restart your WebSphere Commerce server.
    3. To use the old WebSphere Commerce version 5.6.1 store and the new version 7.0 store concurrently, you must migrate the old 5.6.1 store JSP files in your development environment. To migrate your JSP files, see Migrating JSP files and store properties files.