Enabling the Cookie Contents target in JSP-based stores

In order to use the Cookie Contents target in web activities, you must modify the JavaServer Page (.JSP) file for the e-Marketing Spot widget.

Procedure

  1. Find the name and location of the JSP file for the e-Marketing Spot used in the web activity.
    Note:
  2. Open the JSP file for the e-Marketing Spot in which you plan to display the targeted marketing content in any editor tool.
  3. Locate the </wcf:getData> or </wcf:rest> tag.
  4. Add a line of code to the e-Marketing Spot JSP file to pass the cookie name and value to the marketing services within the tag.

    For example, if the name of the cookie is ZIPCODE, then the line of code will be:

    <wcf:param name="ZIPCODE" value="${cookie.ZIPCODE.value}" />
  5. Alternatively, you can add lines of code to the JSP file to pass all cookie names and values to the marketing services; however, this is not the preferred method because a large amount of unnecessary data is passed. For this method, the lines of code to add to the e-Marketing Spot JSP file look like this:
    <c:forEach var="cookieEntry" items="${cookie}">
        <wcf:param name="${cookieEntry.key}" 
    		        value="${cookieEntry.value.value}" />		
    </c:forEach>
  6. Save and close the JSP file.

Results

You can now use the Cookie Contents target in web activities for the JSP-based store.