Setting TermWeb Home Directory

Since TermWeb 3.15 it is possible to store the properties and custom layout files in a directory outside the web app, and specifying the directory path in the environment variable TERMWEB_HOME. By using a separate directory for the config files there is no need to restore the files back into the TermWeb web app directory after updating TermWeb.

Directory structure

The directory specified by TERMWEB_HOME environment variable (called <termweb_home>) should have the following structure:

  • <termweb_home>/
    • termweb.properties
    • log4j.properties
    • custom/
      • Any custom files needed for layout; css files, images, etc. 

Changes to termweb.properties and log4j.properties are picked up automatically by TermWeb. Files in <termweb_home>/custom are copied to <termweb>/custom on startup and any changes in <termweb_home>/custom are not detected. It is however possible to edit the files in <termweb>/custom and see the changes directly, and then copy the changes to  <termweb_home>/custom.

The  <termweb_home> directory should be readable and writable for Tomcat.

Setting TERMWEB_HOME

The variable is set by adding

TERMWEB_HOME=<termweb_home> 

(where <termweb_home> is the full path to your TermWeb directory) to Tomcat's environment. 

 

Linux

The exact location to set the environment variable depends on the Linux distribution. Some possible files are:

  • /etc/tomcat/tomcat.conf
  • <tomcat>/bin/setenv.sh (use export TERMWEB_HOME=<termweb_home>)

Windows

If Tomcat is run as a service you can specify  -DTERMWEB_HOME (e.g. -DTERMWEB_HOME=c:\termweb) in the Java Options in the Apache Tomcat configuration tool.

Another option is to edit <tomcat>/bin/setenv.bat and add 
set TERMWEB_HOME=<termweb_home> 

The variable can also be set by configuring the environment variable through the Windows user interface (typically through 'My Computer' or 'Computer')