Install & Configure Tomcat

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

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

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-7.0.55.tar.gz $BASE
cd $BASE
gunzip apache-tomcat-7.0.55.tar.gz

tar xvf apache-tomcat-7.0.55.tar
rm apache-tomcat-7.0.55.tar

Configuration

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

cd $BASE/apache-tomcat-7.0.55/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-7.0.55/bin/catalina.sh

Add the following lines:

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

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

Add the following lines to each script:

JAVA_HOME=/usr/local/extraview/jre1.7.0_67
CATALINA_HOME=/usr/local/extraview/apache-tomcat-7.0.55

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

$BASE/apache-tomcat-7.0.55/bin/startup.sh
$BASE/apache-tomcat-7.0.55/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 the following Tomcat test page.

Tomcat 7.0 Note

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

<Context useHttpOnly="false">

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"