Home


2.9.1 WebSphere Commerce ECActionServlet explained

WebSphere Commerce V6 store applications use the Struts framework. In the case of Struts, every request URI ending in .do maps to the same ActionServlet.class. However, prior to WebSphere Application Server V6.0, only one cache policy is supported per servlet in releases. Therefore, to cache Struts responses, the cache policy has to be written for the ActionServlet servlet based on its servlet path.

For Commerce, the name of the Struts ActionServlet handling all inbound store-based HTTP requests is com.ibm.commerce.struts.ECActionServlet.class. In v5 of Commerce, the non-Struts-based store applications also funneled requests through a single servlet, the RequestServlet.

In Example | -15 you can see that ECActionServlet is the servlet that creates the output we want to cache. It is the only servlet to be configured in the entire cachespec file because all the Web traffic passes through it.

The meanings of the tags shown in Example | -15 are given in Table | -3.

Table 2-3

Sample content Description
<cache-entry> We are defining a cache entry, the child elements of which will define the properties.
<class>servlet<class> We are going to cache a servlet.
<name>...ECActionServlet.class</name> ECActionServlet is the main servlet in Commerce applications through which all HTTP requests pass.
<property name="consume-subfragments... Cache the entire page. Any subfragments or child JSPs must be included in the cached output.
<property name="save-attributes">false Don't save any of the HTTP request attributes in the cached output.
<exclude>jspStoreDir</exclude> Do not save the jspStoreDir attribute. Refer to ConsumerDirect jspStoreDir issue for more details.

Explanation of the initial cache tags in ConsumerDirect

+

Search Tips   |   Advanced Search