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 setting the value of JAVA_OPTS, to increase the memory size for the server and establish security configuration for Studio.

    Add the setting under the line Execute The Requested Command. It must be added as a single line (no line breaks), with the parameters separated by spaces.

    For Windows, the line to add is:

    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

    For Linux, the line to add is:

    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"
  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 recommended context path of /eid, create a new file called eid.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.

    Note that the directory already contains a file called ROOT.xml, which provides access to the root context for Tomcat.

  4. Modify the XML file created in the previous step to add:
    <Context 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"
        />