Methods for retrieving configuration parameters from the STORECONF table

You can use the StoreConfigurationRegistry to access store configuration values in the STORECONF database table from either Java code or JSP files.

The StoreConfigurationRegistry is a cache for the STORECONF table. The STORECONF table contains configuration-related parameters (name-value pairs) for specific stores. For example, the table contains a number of default configuration values for WebSphere Commerce Search. The table can also store custom configuration values, such as the Facebook application ID for a store that is integrated with Facebook. You can load any custom values to the table by using SQL statements or the Data Load utility. For instructions on how to load data to this table, see Adding extension logic to all store pages.

The STORECONF data is not propagated from staging to production. Therefore, you can have configurations and test systems set up in your staging environment that are different from your production environment.

As an alternative to the StoreConfigurationRegistry, you can use the store REST resource with the IBM_Store_Conf profile to access data in the STORECONF table. For more information, see the store REST resource.

Java code example

From Java code, you can access the StoreConfigurationRegistry directly. The following example code retrieves the value for a parameter in the STORECONF table for a specified store:
StoreConfigurationRegistry storeConfigurationRegistry = StoreConfigurationRegistry.getSingleton();
String value = storeConfigurationRegistry.getValue(storeId, "STORECONF_Name");
public String getValue(Integer storeId, String name)


The store entity ID of the store for which you want to retrieve the configuration data, for example, 10001.
The name of the store configuration value to retrieve, for example, Get the name from the STORECONF.NAME column.

JSP file example

You can use the <wcst:storeconf> tag in a store JSP file to access configuration parameters from the STORECONF table. The <wcst:storeconf> tag reads from the StoreConfigurationRegistry cache to provide access to the configuration parameters. This tag is provided with the WebSphere Commerce Stores tag library (stores.tld). In the default JSTLEnvironmentSetup.jspf file for the Aurora starter store, the library is included, as shown here:

<%@ taglib uri="" prefix="wcst" %>

The following example shows how to use the tag in a store page to get the parameter named from the STORECONF table:

<wcst:storeconf var="confDisplayListPriceInProductPage" name="" scope="request" /> 

The <wcst:storeconf> tag accepts three parameters:

The variable that stores the store configuration value from the STORECONF table.
The name of the store configuration value to retrieve, for example, Get the name from the STORECONF.NAME column.
The scope for the instance variables that are specified by the var parameter. Use any of the following scope values:
  • page
  • request
  • session
  • application

If the scope parameter is not set, then the default value is page.