Consuming the Parameter Values in JSP

Connect is able to pass parameter values to JSP scripts in order to personalize content directed at your cusotmers.

In the following example, the email string is the internal parameter value in the program. "Email" is the name to be passed in the URL by the accepting program. For example, for:
http://example.com/content.jsp?City=Toronto
the mapped attribute is "City" (in this case with a value of 'Toronto')..
In the JSP script, use the following code to access the value of the parameter passed in by Connect.
<%= request.getParameter("City") %>
Note: Connect will not process mail merge tags or script commands in dynamic content. All personalization must be done by the content generator.

In the example below, the script defines the content accessible to customers whose 'City' attribute has the value of 'Toronto' (i.e. "Special Toronto Content"). Customers that do not have a 'City' attribute value of 'Toronto' receive the alternate content (i.e. "Content for Everyone Else!").

<%
  String city = request.getParameter("City");
  if (city.equalsIgnoreCase("Toronto")) {
%>
  Special Toronto Content!
<%
  } else {
%>
  Content for Everyone Else!
<%
  }
%>