Setting up Content Delivery Web service for UGC_ running as JSP Web applications

Install the UGC server role twice as a JSP Web application that contains the Content Delivery Web service, with Ambient Data Framework enabled. If you already have such a Web application, you can add UGC to it and build the second one from scratch; if you do not have Content Delivery Web service setup at all, build both JSP Web applications from scratch.

Procedure

  1. Do one of the following:
    • To add UGC Content Delivery Web service installed as (part of) a JSP Web application, start by going to the root directory of that Web application.
    • To create a new JSP Web application, start by creating a new Web application with a WEB-INF/ directory containing a classes/ subdirectory and a lib/ subdirectory.
  2. Access the SDL Tridion installation media.
  3. Access the Content Delivery\roles\ugc\java\ directory.
  4. Access the lib\ subfolder and copy all the JAR files into the WEB_INF/lib/ subdirectory of your Web application. Overwrite any existing files.
  5. Access the third-party-lib\ subfolder and copy all the JAR files into the WEB_INF/lib/ subdirectory of your Web application. Overwrite any existing files.
  6. If this is a new Web application, download the JDBC driver (JAR file) required for your specific database vendor and Java version, and copy it into the WEB_INF/lib/ subdirectory of your Web application:
    Database vendorJDBC DriverFile to download when using Java 5File to download when using Java 6
    Microsoft SQL ServerMicrosoft SQL Server JDBC Driver 3.0sqljdbc.jarsqljdbc4.jar
    Oracle

    Oracle JDBC driver 11.2.0.2 or

    Oracle JDBC driver 11.2.0.1.0 (deprecated)

    ojdbc5.jarojdbc6.jar
  7. Go to the root of the SDL Tridion installation media and navigate to resources\configurations\.
  8. If this is a new Web application, copy logback.xml from that folder to the WEB_INF/classes/.
  9. If this is a new Web application, copy and rename the following configuration files to the WEB_INF/classes/ subdirectory:
    Copy this configuration file......and rename it to this:
    cd_ambient_conf_sample.xmlcd_ambient_conf.xml
    cd_storage_conf_sample.xmlcd_storage_conf.xml
    cd_dynamic_conf_sample.xmlcd_dynamic_conf.xml
    cd_wai_conf_sample.xmlcd_wai_conf.xml
    cd_webservice_conf_sample.xmlcd_webservice_conf.xml
  10. Open cd_ambient_conf.xml (if using) in a plain-text or XML editor.
  11. Find the <Security> section and enclose it in comments. This element is only needed if you intend to set up OAuth authentication.
  12. Save and close cd_ambient_conf.xml.
  13. Copy the configuration file cd_ugc_conf_sample.xml to the WEB-INF/classes/ subdirectory and rename it to cd_ugc_conf.xml.
  14. Copy cd_licenses.xml, your Content Delivery license file available from SDL Tridion Customer Support, to the config (.NET) or classes (Java) directory of your Web application.
    If you want to name the file differently or put it in a different location, you need to update the License element in your configuration files.
  15. Configure logging.
  16. If your configuration files include a cd_storage_conf.xml, configure the Storage Layer and optionally encrypt sensitive strings.
  17. If your Web application server is JBoss, locate the following files in the WEB_INF/lib/ subdirectory and remove them:
    • stax-api.jar
    • serializer.jar
    • xalan.jar
    • axis-jaxprc.jar
  18. If your Web application server is WebLogic, do the following:
    1. Remove the file stax-api.jar from your WEB_INF/lib/ subdirectory.
    2. Add a weblogic.xml file to the WEB-INF folder of your Web application that forces WebLogic to use the libraries contained in the Web application, rather than its own libraries. The contents of this weblogic.xml file must be as follows:
      <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
            <container-descriptor>
                  <prefer-web-inf-classes>true</prefer-web-inf-classes>
            </container-descriptor>
      </weblogic-web-app>
  19. If this is a new Web application, navigate to Content Delivery\roles\webservice\java\ and copy web.xml to the root of your JSP Web application.
  20. If this is a new Web application, open the web.xml file and uncomment the section headed 'Sample configuration for the Web service'.
  21. Open the web.xml file and uncomment the following sections:
    • The section headed 'OAuth 2.0 security access filter'.
    • The section headed 'Uncomment the following block to apply the filter for the UGC user.'
  22. Save and close web.xml.
  23. Start your Web application.
  24. Now repeat all the steps above to create your second JSP Web application.