Documentation Center

Setting up SmartTarget in a Java Web application

You need to install SmartTarget presentation server-side components (JAR files and config files) in a Web application.

Before you begin

Before installing, read and install Prerequisites for SmartTarget on Presentation Server.

About this task

The top level directory structure of your Java Web application should be as follows:

Web application
   |--WEB-INF
      |--web.xml
      |--classes
      |--lib 

Procedure

  1. Access the SmartTarget installation media.
  2. Navigate to the directory Content Delivery\java\lib and copy the following files to the lib subdirectory of your Web application:
    • smarttarget_core.jar
    • smarttarget_entitymodel.jar
  3. Navigate to the directory Content Delivery\java\third-party-lib and copy the following files to the lib subdirectory of your Web application.
    • commons-codec.jar
    • commons-discovery.jar
    • commons-httpclient.jar
    • commons-lang.jar
    • commons-logging.jar
    • jdom.jar
    • jersey-client.jar
    • jsr181-api.jar
    • oro.jar
  4. Navigate to the Ambient Data Framework\cartridges directory and copy the following files into the lib directory of your Web application:
    • session_cartridge.jar (processes raw session data)
    • smarttarget_cartridge.jar (puts Trigger Types defined in SmartTarget in the Claim Store)
  5. Download an appropriate version of the jstl.jar file for your servlet container version and copy the file to the lib subdirectory of your Web application.
  6. Navigate to the folder Content Delivery\java\web\tld and copy the Tag Library file into the lib directory:
    • smarttarget.tld
  7. Navigate to the folder Ambient Data Framework\configuration\samples\cd_ambient_conf_sample.xml file and do one of the following:
    • if this file already exists in your Web application classes directory, merge the contents of the <Cartridges> section into this file;
    • if this file is not present in your Web application classes directory, copy the file to this directory and rename it cd_ambient_conf.xml.
    <Cartridges>
      <Cartridge File="/smarttarget_cartridge_conf.xml"/>
      <Cartridge File="/session_cartridge_conf.xml"/>
    </Cartridges>

    If you have installed the Audience Manager cartridge, make sure it is also configured:

    <Cartridge File="/audiencemanager_cartridge_conf.xml"/>
  8. Navigate to the folder Content Delivery\configuration\samples and copy the following files to the classes subdirectory of your Web application:
    • logback_sample.xml
    • smarttarget.referrers_sample.xml
  9. Rename and configure these files:
    • Rename logback_sample.xml to logback.xml, or merge the file with your existing logback.xml file.
    • Rename smarttarget.referrers_sample.xml to smarttarget.referrers.xml.
  10. Go to your Content Delivery %TRIDION_HOME%\config directory and copy the smarttarget_conf.xml file to the classes subdirectory of your Web application.

Results

You have installed SmartTarget in a Java Web application.