Conditional Content Example using Java Server Pages (JSP)

This section presents an example of how Java Server Pages (JSP) can be used to personalize content based on each customer’s profile information.

Connect generates content based on parameters passed from the Connect database to the content generator. Logic in the JSP templates determines which content is displayed, based on the parameter values passed.

A common example of conditional content is a store sale promotion that contains the store address closest to the customer. This is performed by Connect passing the customer's home location to the content generator. The content generator then uses the parameter value to determine the closest store location and displays it in the JSP.

Merging and Procedural Functions

In general there are two ways to use conditional content:
  • Merging: Much like mail merge, personalized customer-record content is displayed but has added string manipulation functionality allowing links to be created with personalized arguments
  • Conditional Content: Using customer attributes to determine the exact content that is displayed for the customer.