Adding Experience Optimization to your Java/JSP API (RESTful) Role

Copy and merge resources for the Java/JSP API (RESTful) Role.

Procedure

  1. If you want to use search terms extracted from the referrer in the search of your Web site, then from the Experience Optimization\Content Delivery\resources\samples\ installation media folder, copy the file smarttarget.referrers.xml to the WEB-INF\classes\ subfolder of the Web application.
  2. If you have chosen not to reference the online Content Interaction Libraries (CILs) on Maven from a pom.xml file, then, from the folder api\rest\java\lib\, copy all files to the WEB-INF/lib/ subfolder of the Web application that contains your API (RESTful) Role.
  3. From the Experience Optimization\Content Delivery\roles\api\rest\config\ installation media folder, copy the file smarttarget_conf.xml to the WEB-INF\classes\ subfolder of the Web application.
  4. Go to http://jstl.java.net, the site of the JSTL (Java Standard Tag Library), and download a version of jstl.jar that is compatible with your servlet container version. Copy jstl.jar to your WEB-INF/lib/ subfolder.
  5. Merge the contents of the file Experience Optimization\Content Delivery\roles\api\rest\config\logback.xml on the installation media with the existing logback.xml file in the WEB-INF/classes/ subdirectory of your Web application.
  6. In the WEB-INF/ folder of the Web application, open web.xml for editing and add the following:
    <!-- Experience Optimization Experiment Tracking -->
    <servlet>
      <servlet-name>Experience Optimization Experiment Tracking</servlet-name>
      <servlet-class>com.tridion.smarttarget.analytics.tracking.TrackingRedirect</servlet-class>
    <servlet>
    
    <servlet-mapping>
      <servlet-name>Experience Optimization Experiment Tracking</servlet-name>
      <url-pattern>/redirect/</url-pattern>
    <servlet-mapping>
  7. Save and close web.xml
  8. Restart the Web site.