Publishing a store archive using the PublishStore utility (AIX, OS/400, Linux, Solaris)

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.

To publish using the command line:

  1. Ensure that you have Site Administrator access.
  2. Issue the following command:
    cd WC_installdir/bin
    
  3. Run the publishstore utility:
     ./publishstore.sh -svr hostname -userid userId -pwd password -sar storeArchiveFilename
    

    where:

    hostname
    is the fully qualified TCP/IP name of your WebSphere Commerce Server and the tools port number (optional) for your instance. You can find the tools port number in the Configuration Manager, under Instance properties> WebSphere. By default, this is host_name:8000.
    userId
    is the user ID for the Site Administrator. You must have Site Administrator access to publish a store archive.
    password
    is Site Administrator's password for WebSphere Commerce.
    storeArchiveFilename
    is full path of the store archive on the host machine. For example, /usr/CommerceServer/samplestores/ConsumerDirect/ConsumerDirect.sar or
    i5/OSiSeries/QIBM/ProdData/CommerceServer56/samplestores/ConsumerDirect/ConsumerDirect.sar
  4. Open Internet Explorer. Go to the following Web address:
    http://hostname/webapp/wcs/stores/servlet/storedir/index.jsp
    

    Your store displays.

    Note: 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. To batch compile the store's JSP files, see Compiling your JavaServer Page files.

    Business Edition onlyIf you publish the advanced B2B direct store archive, you must stop and restart the WebSphere Commerce Server before viewing the store, or the registration page will not display properly. For more information, see Starting and stopping WebSphere Commerce. In order to prevent unnecessary exceptions displaying, delete the SendTransactionMsg job from the scheduled jobs. For more information, see Deleting a scheduled job.

  5. In order to enable caching in the starter stores, you must merge the cachespec.xml file from the following directory:

    with the cachespec.xml file in the following directory:

    You must edit the existing cachespec.xml file in the WEB-INF directory with the changes in the first file, rather than replace it.

If you have problems displaying your store, see Troubleshooting publishing.

Important:

  1. 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:
    3. Start the Web server.
  2. If you change the Web application Context path, you must ensure that it matches the path defined in the WebSphere Commerce Server.
  3. Only one store archive at a time can be published.
  4. When you launch the consumer direct starter 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.
  5. Business Edition onlyIf you are logged in as the default 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.
  6. 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 development environmentIf you are using the WebSphere Commerce development environment, the servlet caching is disabled by default.

Feedback