Modifying the Tomcat configuration to work with Studio

Before you can deploy Studio, you must modify some of the Tomcat configuration files.

To complete the Tomcat configuration updates:

  1. In the endeca-portal/apache-tomcat-<version>/bin/ directory, modify catalina.bat (on Windows) or catalina.sh (on Linux) by adding the JAVA_OPTS (for Linux) or set JAVA_OPTS (for Windows) line.

    This line should be added under the line Execute The Requested Command as follows (for Windows, the line needs to start with set):

    JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF8
    -Duser.timezone=GMT -Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config"
    -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
    -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    

    Adding this line increases the memory size for the server and establishes security configuration for Studio.

  2. Modify the file endeca-portal/apache-tomcat-<version>/conf/catalina.properties as follows to add the ext directory to the common class loader:
    common.loader=
        ${catalina.base}/lib,\
        ...\
        ${catalina.home}/lib/ext/*.jar
  3. To deploy Studio in the root context, create a new file called ROOT.xml in endeca-portal/apache-tomcat-<version>/conf/Catalina/localhost/.

    To deploy Studio into any other context, create a new file called <context root>.xml in endeca-portal/apache-tomcat-<version>/conf/Catalina/localhost/.

    For multi-level context paths, separate the name with #. For example, for a context path of /sales/east, the file name should be sales#east.xml.

  4. Modify the XML file created in the previous step as needed:
    • For a root context: <Context path="" crossContext="true" />
    • For a context of /sales: <Context path="/sales" crossContext="true" />
    • For a context of /sales/east: <Context path="/sales/east" crossContext="true" />
  5. To support UTF-8 URI encoding, edit the server.xml file, located in the endeca-portal/apache-tomcat-<version>/conf directory, as follows:
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
        <Connector port="8080" protocol="HTTP/1.1" 
            connectionTimeout="20000" 
            redirectPort="8443"
            URIEncoding="UTF-8"
        />