Copy and merge resources for the Java/JSP API (RESTful) Role.
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
- On the installation media, go to the following directory for the Experience Optimization Role:
Content Delivery\roles\xo\api\rest\java\config\
- Copy or merge files from the installation media to the WEB-INF/classes/ subdirectory of the web application, as follows:
- smarttarget_conf.xml — Copy the file. You will configure settings in the file in a later task.
- smarttarget.referrers.xml — (Optional) Copy the file if you want to use search terms extracted from the referrer in the search of your website.
- 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.
- Open your web application's cd_client_conf.xml file for editing and do the following:
- Locate the
QueryClient element, which should look similar to the following:
<ServiceConfig Version="11.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}">
<DiscoveryService ServiceUri="${discoveryurl:-http://localhost:8082/discovery.svc}"/>
<TokenService ClientId="${clientid:-cduser}" ClientSecret="${clientsecret:-encrypted:o/cgCBwmULeOyUZghFaKJA==}"/>
<QueryClient Class="com.sdl.tridion.xo.query.client.rest.RestQueryClient" />
</ServiceConfig>
- Edit the parameters es.host and es.port with values appropriate for your Elasticsearch instance.
- Save and close cd_client_conf.xml.
- If you have chosen not to reference the online Content Interaction Libraries (CILs) on Maven from a pom.xml file, then copy the contents of the api\rest\java\lib\ folder to the website's WEB-INF/lib/ folder on your target machine.
- Restart the website.