REST services in storefront JSP files for remote stores

Remote stores communicate with the Transaction server by using the REST services. Therefore, some JSP in V8 local store will not work on V9 remote store. Hence Java code and Data beans cannot be used. Instead you must use the wcf:rest tag.

For more information, see REST services in storefront JSP files.


The following example shows how the wcf:rest tag can be used to fetch information about a particular order.

The Store ID and Order ID are required to fetch information about a particular order.

<wcf:rest var="order" url="store/{storeId}/order/{orderId}" scope="request">
  <wcf:var name="storeId" value="${storeId}" encode="true"/>
  <wcf:var name="orderId" value="${WCParam.orderId}" encode="true"/>
  <wcf:param name="sortOrderItemBy" value="orderItemID"/>
An order might contain more than one item.

<c:forEach var="orderItem" items="${order.orderItem}" varStatus="status">
  <c:set var="itemId" value="${orderItem.orderItemId}"/>
  <c:set var="addressId" value="${orderItem.addressId}"/>
  <c:set var="shipModeId" value="${orderItem.shipModeId}"/>
  <c:set var="keyVar" value="${addressId}_${shipModeId}"/>
  <c:set var="itemIds" value="${blockMap[keyVar]}"/>
      <c:when test="${empty itemIds}">
        <c:set target="${blockMap}" property="${keyVar}" value="${itemId}"/>
        <c:set target="${blockMap}" property="${keyVar}" value="${itemIds},${itemId}"/>

Example of implementation in versions prior to 9.0

In previous versions, Java classes were included in the JSP files.

<%@ page import="javax.servlet.*,