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
- 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.
- Access the SDL Tridion installation media.
- Access the Content Delivery\roles\ugc\java\ directory.
- Access the lib\ subfolder and copy all the JAR files into the WEB_INF/lib/ subdirectory of your Web application. Overwrite any existing files.
- 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.
- 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 vendor JDBC Driver File to download when using Java 5 File to download when using Java 6 Microsoft SQL Server Microsoft SQL Server JDBC Driver 3.0 sqljdbc.jar sqljdbc4.jar Oracle Oracle JDBC driver 11.2.0.2 or
Oracle JDBC driver 11.2.0.1.0 (deprecated)
ojdbc5.jar ojdbc6.jar - Go to the root of the SDL Tridion installation media and navigate to resources\configurations\.
- If this is a new Web application, copy logback.xml from that folder to the WEB_INF/classes/.
- 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.xml cd_ambient_conf.xml cd_storage_conf_sample.xml cd_storage_conf.xml cd_dynamic_conf_sample.xml cd_dynamic_conf.xml cd_wai_conf_sample.xml cd_wai_conf.xml cd_webservice_conf_sample.xml cd_webservice_conf.xml - Open cd_ambient_conf.xml (if using) in a plain-text or XML editor.
- Find the
<Security>section and enclose it in comments. This element is only needed if you intend to set up OAuth authentication. - Save and close cd_ambient_conf.xml.
- Copy the configuration file cd_ugc_conf_sample.xml to the WEB-INF/classes/ subdirectory and rename it to cd_ugc_conf.xml.
- 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
Licenseelement in your configuration files. - Configure logging.
- If your configuration files include a cd_storage_conf.xml, configure the Storage Layer and optionally encrypt sensitive strings.
- 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
- If your Web application server is WebLogic, do the following:
- Remove the file stax-api.jar from your WEB_INF/lib/ subdirectory.
- 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>
- 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.
- If this is a new Web application, open the web.xml file and uncomment the section headed 'Sample configuration for the Web service'.
- 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.'
- Save and close web.xml.
- Start your Web application.
- Now repeat all the steps above to create your second JSP Web application.