Skip to main content

Posts

Refresh bundle JSP for Websphere commerce 8

As we do in general practice to hit   refreshBundles.jsp   to clear out resource bundle cache without restarting the server. Recently, I figured out that it no more works with IBM 8 and throws error message like " no such method exists: cache " Actually, the field " cache " is now replaced with " cacheList ". Moreover, its type is now   ConcurrentHashMap   instead of   WeakHashMap . Change the Java logic of your JSP as below: <% Class klass =      Class.forName("java.util.PropertyResourceBundle").getSuperclass(); Field field = klass.getDeclaredField("cacheList"); //Test block check for all the declared fields. Comment out the loop below. for (Field classField : klass.getDeclaredFields()) { System.out.println(classField.getName()); } field.setAccessible(true); ConcurrentHashMap cache = (ConcurrentHashMap)field.get(null); cache.clear(); field.setAccessible(false); %>
Recent posts

Enabling Inventory index for storefront in Websphere Commerce

By default, Inventory Index is only meant for business users to use in CMC for Product Ranking and merchandising purpose. This document describes how to enable this OOTB SOLR Index for Store Front usage so that it can be used to get SKUs Inventory from SOLR Index instead of DB hits. The implementation involves two steps: Enable OOTB Inventory Index Make it usable by Store Front Pages Enable Inventory Index This step is well described at Infocenter at  Setting up and building the inventory index Enable Inventory Index for Store Front pages This involves following steps Define a Search resource Handler to accept Inventory fetch requests. SOLR Index Customization, if required Define a search Profile to expose Inventory Schema fields to Response Map SOLR schema fields to External Response fields Custom Expression Provider to get default fulfillment center Id. Cre

Auto Suggestion in Websphere Commerce Search

There are two types of auto suggestions..  1) Suggest keywords based on Search term. 2) Suggest actual Entity based on Search term. The Auto-Suggestion feature is now handled via Search Rest calls in FEP8. Technically it is Term Search for Spellcheck fields. So the whole thing can be summarized as below mentioned steps: /conf/solrconfig.xml Configure request handler for  /terms  URL Configure  wc_textSuggest  and  wc_spellCheck  configuration /conf/schema.xml Define SOLR fields that are too be shown as Auto Suggested keywords when searched for Terms Define Spell check fields which are to be spell corrected for showing suggestions SOLR Configuration Changes   As auto suggested keywords are nothing but different Terms that are being Indexed at the time of commit, we need to define a handler in solrconfig.xml. <!--          WebSphere Commerce terms request handler          This requestHandler can be used for search term auto-suggest. -->

File Upload in Websphere Commerce

Websphere Commerce has a inbuilt mechanism to handle the file upload process but it has some limitations with it. Whenever a File type is present in request object, commerce ignores the rest of parameters coming after that. The inbuilt mechanism treats the file object as UploadedFile type object. This type of object provides a limited number of options to further process the File Objects. To  overcome these limitation, we need to use Apache Common Fileupload features to handle the File Upload process for Hanes. File Upload Basic Requirements In order to pass a File object in request, we need to make some changes in the Form. File Upload is not supported by REST or Ajax REST Requests. Icon Request Parsing The first step is to parse the request for Uploaded File Objects. And apart from this we need to get the other parameters back to request properties, which is not available because of the limitation of commerce. To