Install & Configure Tomcat

We recommend installing Tomcat 8.0 to work with this release of ExtraView. 

The following steps will install Tomcat into the directory $BASE/apache-tomcat-8.0.xx.

Note that Tomcat is required, even if you are intending to use Microsoft IIS as your web server. IIS does not provide the same functionality as Tomcat.

Installation

cd $INSTALL 
cp apache-tomcat-8.0.xx.tar.gz $BASE
cd $BASE
gunzip apache-tomcat-8.0.xx.tar.gz

tar xvf apache-tomcat-8.0.xx.tar
rm apache-tomcat-8.0.xx.tar

Configuration

We can remove *.bat files since this is a UNIX installation.

cd $BASE/apache-tomcat-8.0.xx/bin 
rm *.bat
chmod 744 startup.sh shutdown.sh catalina.sh

The following steps will set memory parameters for Tomcat and configure it to run with the correct Java.

We generally do not recommend setting the Xmx parameter above 1024 megs at maximum. If your system usage is predicted to be high enough that you will require more memory, we strongly suggest installing a clustered set of multiple Tomcat nodes under a load-balanced Apache web server.

vi $BASE/apache-tomcat-8.0.xx/bin/catalina.sh

Add the following lines:

JAVA_HOME=/usr/local/extraview/jre1.8.0_xx
CATALINA_HOME=/usr/local/extraview/apache-tomcat-8.0.xx
CATALINA_OPTS="-server -Xms96m -Xmx512m -Djava.awt.headless=true -Dfile.encoding=UTF-8"

vi $BASE/apache-tomcat-8.0.xx/bin/startup.sh $BASE/apache-tomcat-8.0.xx/bin/shutdown.sh

Add the following lines to each script:

JAVA_HOME=/usr/local/extraview/jre1.8.0_xx
CATALINA_HOME=/usr/local/extraview/apache-tomcat-8.0.xx

Tomcat is now installed in the directory $BASE/apache-tomcat-8.0.xx. You can start/stop tomcat using the following commands:

$BASE/apache-tomcat-8.0.xx/bin/startup.sh
$BASE/apache-tomcat-8.0.xx/bin/shutdown.sh

If you enter the URL of the server using port 8080 into a browser, for example http://server.domain.com:8080, you should get a test page similar to the following.

Tomcat 7.x Notes

If your users are likely to use languages other than English, it is recommended that you add the following line to the server.xml file within the conf directory.

You will have one or more lines that look similar to:

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

Following each of these lines, add the entry

URIEncoding="UTF-8"

Tomcat 8.x Notes

  1. Modify the <Context> entry in the context.xml file to be

    <Context useHttpOnly="false">

    You should add the following to the tomcat/conf/context.xml file:

    <!-- Force use of the old Cookie processor (because this Tomcat version uses RFC6265 Cookie Specification) -->
    <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />

    There is no need for the Tomcat 7.x configuration in the previous Tomcat 7.x note.

  2. Locate the following section in the Tomcat configuration file <tomcat_home>/conf/context.xml:

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    and alter to use this setting:

    <!-- Disable session persistence across Tomcat restarts -->
    <Manager pathname="" />

     

  3. Make sure you restart Tomcat after altering its configuration.

There is no need for the Tomcat 7.x configuration in the previous paragraph.

Use of WAR files with Apache Tomcat

Normally, Tomcat explodes any existing WAR files and uses the extracted contents. However, Tomcat also supports the use of unexploded WAR files.

To configure Tomcat for use of unexploded WAR files, update the server.xml file to prevent explosion of WAR file as follows:

Find the line:

unpackWARs="true" autoDeploy="true"

Change this to:

unpackWARs="false" autoDeploy="true"<