Technote

(troubleshooting)
WebSphere Commerce JHelper is unable to retrieve catalogId from request properties.
Problem(Abstract)
The catalogId is unable to be retrieved from the JHelper object, as in the following example code:

JSPHelper jhelper = new JSPHelper(request);
String catalogId = jhelper.getParameter("catalogId");
Cause
This is a known issue in WebSphere Commerce 6.
Resolving the problem
APAR JR26673 is able to resolve this issue. Please contact WebSphere Commerce Support for obtaining this APAR.

There is also a workaround, by using StoreAccessBean. For example, see the following code snippet:

JSPHelper jhelper = new JSPHelper(request);
String storeId = jhelper.getParameter("storeId");

CommandContext commandContext = (CommandContext)
request.getAttribute(ECConstants.EC_COMMANDCONTEXT);
com.ibm.commerce.common.objects.StoreAccessBean storeAB = new
com.ibm.commerce.common.objects.StoreAccessBean();
storeAB.setInitKey_storeEntityId(storeId);

String catalogId =
storeAB.getMasterCatalog().getCatalogReferenceNumber();

 

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21273523