Adding Experience Optimization to a Java/JSP API Server Role (deprecated in-process setup)

For a deprecated in-process setup, install Experience Optimization Presentation Server-side components (JAR files and config files) in the Java/JSP web application that contains the deprecated API.

Before you begin

You have configured your web application to connect to the online Content Interaction Libraries (CILs) to ensure that your web application makes use of the latest versions of the CILs. For Java, you do this by configuring references to Maven from a Project Object Model (POM) file, pom.xml.

Procedure

  1. On the installation media, go to the following directory for the Experience Optimization Role:

  2. From the cartridges\ subfolder, copy the Session Cartridge JAR to location of your choice in the lib/ subdirectory of your web application.
  3. From the api\in-process\java\lib\ subfolder, copy all the JAR files to the WEB-INF/lib/ subdirectory of your web application.
  4. From the api\in-process\java\config\ subfolder, copy or merge files to the WEB-INF/classes/ subdirectory of the web application, as follows:
    1. smarttarget_conf.xml — Copy the file. You will configure settings in the file in a later task.
    2. smarttarget.referrers.xml — (Optional) Copy the file if you want to use search terms extracted from the referrer in the search of your website.
    3. logback.xml — Merge the file with the existing file in your web application.
    4. cd_ambient_conf.xml — If you have an existing file in your web application, merge the contents of the <Cartridges> section into the existing file.
      Your Cartridges section must contain the following Cartridge configurations:
      <Cartridge File="/session_cartridge_conf.xml"/>
      If you have installed the Audience Manager cartridge, make sure it is also configured:
      <Cartridge File="/audiencemanager_cartridge_conf.xml"/>
    5. cd_client_conf.xml — If you have an existing file in your web application, merge the file with the existing file. Additional configuration will be needed in the next step.
  5. Open the cd_client_conf.xml file for editing and locate the QueryClient element. It should look similar to the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <ServiceConfig Version="10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:noNamespaceSchemaLocation="schemas/xo-search-conf.xsd"
                   ConnectionTimeout="${indexconnectiontimeout:-10000}"
                   ReadTimeout="${indexreadtimeout:-30000}"
                   WriteTimeout="${indexwritetimeout:-30000}"
                   MaxIdleConnections="${indexmaxidleconnections:-30}">
    
        <QueryClient Class="com.sdl.tridion.xo.query.client.embedded.EmbeddedQueryClient" Embedded="true">
            <QueryProvider Type="elasticsearch">
                <Properties>
                    <Property Name="index.common.name.prefix" Value=""/> 
                    <Property Name="es.host" Value="localhost"/>
                    <Property Name="es.port" Value="9200"/>
                </Properties>
            </QueryProvider>
        </QueryClient>
    </ServiceConfig>
  6. Edit the parameters es.host and es.port with values appropriate for your Elasticsearch instance.
  7. Save and close cd_client_conf.xml.

Results

You have installed Experience Optimization in a Java web application.