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:
- Ensure that you have Site Administrator access.
- At a command line, change the directory to /bin. Then type the following command, using valid parameters for your store archive:
publishstore -svr host_name -userid userId -pwd password -sar storeArchiveFilename
where:
- 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 the full path of the store archive. For example, c:\wcs\samplestores\ConsumerDirect\ConsumerDirect.sar
The following is an example of the command:
publishstore -svr myhost -userid wcsadmin -pwd wcsadmin -sar c:\wcs\samplestores\ConsumerDirect\ConsumerDirect.sar
- While the store archive is being published, you 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.
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.
If you publish the advanced 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.
In order to prevent unnecessary exceptions displaying, delete the SendTransactionMsg job from the scheduled jobs. For more information, see Deleting a scheduled job.
- In order to enable caching in the starter stores, you must merge the cachespec.xml file from the following directory:
WAS_installdir\samples\dynacache\businessmodel
with the cachespec.xml file in the following directory:
WAS_installdir\installedApps\host_name\WCServer_enterprise_archive\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.Note: 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.
Important:
- 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:
- Stop the Web server.
- Copy the following directory from the WebSphere Commerce machine to the Web Server machine in the same location:
- WAS_installdir\installedApps
- Start the Web server.
- If you change the Web application Context path, you must ensure that it matches the path defined in the WebSphere Commerce Server.
- Only one store archive at a time can be published.
If 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.
- If you plan to make changes to your 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.