Mapping device-specific requests to a JSP file template
The Madisons mobile starter store uses the incoming HTTP request headers and the wc-devices.xml file by default to route mobile devices to the mobile starter store pages. You can add to the wc-devices.xml file to route additional devices to specific mobile pages. The wc-devices.xml file is reloaded automatically by default when WebSphere Commerce detects changes to the file.
Note:
- If you have not deployed the Madisons mobile starter store, or if you want to disable the auto-reload functionality, remove the wc-devices.xml entry from the WC_eardir/xml/config/com.ibm.commerce.foundation/.reloadfilelist file. If the .reloadfilelist file is empty, you can simply remove the file from the directory.
- A reload interval can be specified in the
.reloadfilelist file by adding the following property:
For example, if you use a property ofreloadinterval=numberOfSeconds
reloadinterval=300
in the .reloadfilelist file, the specified files are only reloaded 5 minutes after the last reload time. By default, this property is not specified in the file and when it is not specified, the reload interval is set to 3600, or 60 minutes. - You can force the loading of the mobile storefront from a non-mobile browser
by entering the following URL:
- http://host_name/webapp/wcs/stores/servlet/mStoreView?storeId=storeId
Before you begin
- Installed WebSphere Commerce version 7
- Deployed the Madisons mobile starter store
Procedure
-
Create an extensions directory and new wc-devices.xml extension file:
-
Add your devices to the wc-devices.xml extension file:
- Your extension file changes are automatically deployed to WebSphere Commerce, without needing to restart your server. The wc-devices.xml file is reloaded automatically by default when WebSphere Commerce detects changes to the file.