Troubleshoot and support > Cache


Troubleshoot: Dynamic caching in an application

WebSphere Commerce uses the Java Server Tag Library to create new JSP pages. This enables a Web developer to create a Java page without having to worry about the underlying code, while a Java developer can write the code simultaneously, or at a later period. Unfortunately, dynamic caching cannot execute the JSTL <c:import> tag on its own.

If you are using JSTL for the store pages and want to use dynamic caching to cache the pages:

  1. Open the JSP file.

  2. Create an out.flush() around the <c:import> tag in the JSP file.

    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    
    <% out.flush(); %>
        
        <c:import url="${jspStoreDir}${StyleDir}CachedHeaderDisplay.jsp">
                   
            <c:param name="storeId" value="${WCParam.storeId}"/> 
            <c:param name="catalogId" value="${WCParam.catalogId}"/> 
            <c:param name="langId" value="${langId}"/> 
            <c:param name="categoryId" value="${categoryId}"/> 
            <c:param name="userType" value="${userType}"/> 
            <c:param name="lastCmdName" value="${lastCmdName}"/>
        
        </c:import>
    
    <% out.flush(); %>
    

You should now be able to use dynamic caching.

Tip: It is not required to use out.flush statements, however, the pages may not display correctly without including out.flush statements around every <c:import> statement.


+

Search Tips   |   Advanced Search