Copying Context Engine Cartridge resources

Copy JAR files to add the Context Engine Cartridge to a Web application.

Procedure

  1. On the server that contains the Web application to which you want to add Context Engine Cartridge, navigate to the library location of your Web application:
    • For a .NET Web application, navigate to the bin\lib\ folder.
    • For a Java Web application, navigate the files to the WEB-INF/lib/ directory.
  2. In the SDL Tridion installation media, navigate to the folder \Context Engine Cartridge\java\lib\ and copy the following files to your Web application library location:
    • cwd_cartridge.jar
    • cwd_engine.jar
  3. Navigate to the \Context Engine Cartridge\java\third-party-lib\ folder of the installation media. Copy the JAR files in this location to your Web application library location:
    • commons-beanutils.jar
    • commons-configuration.jar
    • commons-digester.jar
    • commons-jexl.jar
    • commons-lang.jar
    • ehcache.jar
    • hibernate-ehcache.jar
    • hsqldb.jar
    • patricia-trie.jar
    • snakeyaml.jar
    • ua-parser.jar
  4. On the installation media, navigate to the \Context Engine Cartridge\configuration\samples\ folder of the installation media. In your Web application, navigate to the location of your other configuration files:
    • For a .NET Web application, go to the bin\config\ folder.
    • For a Java Web application, go to the WEB-INF/classes/ directory.
  5. Copy the following files from the installation media to this location:
    • cwd_engine_cartridge_conf_sample.xml
    • cwd_engine_vocabulary_conf_sample.xml
    • cwd_engine_conf_sample.xml
  6. Rename each of these files to remove the _sample part from the filename. For example, rename cwd_engine_cartridge_conf_sample.xml to cwd_engine_cartridge_conf.xml.
  7. If your Web application does not yet contain a logback.xml file, copy logback.xml from the \Content Delivery\resources\configurations\ folder of the installation media to the location of your other Web application configuration files.
  8. Alternatively, if your Web application already contains a logback.xml file, open that file for editing and make the following changes:
    • In the list of appenders, add the following:

      <appender name="rollingContextLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
           <fileNamePattern>${log.folder}/cd_context.%d{yyyy-MM-dd}.log</fileNamePattern>
           <maxHistory>${log.history}</maxHistory>     
        </rollingPolicy>
        <encoder>
          <charset>${log.encoding}</charset>
          <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
      </appender>
    • In the list of loggers, add the following:

      <logger name="com.sdl.context" level="${log.level}">
        <appender-ref ref="rollingContextLog" />
      </logger>

    Then save and close logback.xml.