How to display webactivity or e-Spot data content on the JSP in IBM WCS

If you have already created a webactivity using dataload or CMC and want to display all the e-Spots data at store front or JSP.

You can use below rest call to get all the details and data about the webactivity by passing the e-Spot name into it.

<wcf:rest var="VARIABLE_NAME" url="store/{storeId}/espot/{name}" scope="request">
    <wcf:var name="storeId" value="${storeId}" encode="true" />
    <wcf:var name="name" value="ESPOT_NAME" encode="true" />
    <wcf:param name="catalogId" value="${catalogId}" />
    <wcf:param name="langId" value="${langId}" />
</wcf:rest>
<c:if test="${not empty VARIABLE_NAME}">
    <c:forEach var="VARIABLE_ITEM_DATA" items="${VARIABLE_NAME.MarketingSpotData[0].baseMarketingSpotActivityData}">
        <c:set var="VARIABLE_ITEM" value="${VARIABLE_ITEM_DATA.marketingContentDescription[0].marketingText}" />
        <div><c:out value="${VARIABLE_ITEM}" escapeXml="false" /></div>
    </c:forEach>
</c:if>

Just replace ESPOT_NAME by the actual main e-Spot name on which you have created the webacrivity.

Also if you want, you can use other variable names accrording to your need instead of using like VARIABLE_NAME etc.

One Comments

  • yamini April 26, 2019 at 9:06 am Reply

    Good job Lokesh!!

Leave a Reply