Configuring Tomcat for TQ Data Foundation

To run TQ Data Foundation, an instance of Apache Tomcat must be provisioned and appropriately configured.

Supported Tomcat versions

See TQ Data Foundation Server Platform Considerations.

Configuring CATALINA_OPTS

Warning

This is required for Data Foundation to work.

The CATALINA_OPTS environment variable must be set to pass additional command-line options to the Java executable when Tomcat is started.

If you placed your setup file in a different location, then adjust the path after -Dedg.setup= accordingly. See also: Setup File: Location.

On Debian-based Linux distributions:

Edit /etc/default/tomcat11 and add:

CATALINA_OPTS="$CATALINA_OPTS -Dedg.setup=/var/lib/topbraid-edg/edg-setup.properties"
CATALINA_OPTS="$CATALINA_OPTS --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED"
On other Linux distributions and macOS:

Edit/create Tomcat’s <CATALINA_BASE>/bin/setenv.sh file and add:

CATALINA_OPTS="$CATALINA_OPTS -Dedg.setup=/var/lib/topbraid-edg/edg-setup.properties"
CATALINA_OPTS="$CATALINA_OPTS --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED"
On Windows:

Edit/create Tomcat’s <CATALINA_BASE>\bin\setenv.bat file and add:

set "CATALINA_OPTS=%CATALINA_OPTS% -Dedg.setup="C:\TopBraid-EDG\edg-setup.properties""
set "CATALINA_OPTS=%CATALINA_OPTS% --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED"

For more information on setting CATALINA_OPTS, see the Tomcat documentation: Using the “setenv” script

Including usernames in the Tomcat access log

To include the EDG username in Tomcat’s access log, edit <CATALINA_BASE>/conf/server.xml and modify the AccessLogValve entry (typically located at the bottom of the file). Replace %u with %{username}s. That is,

pattern="%h %l %u %t &quot;%r&quot; %s %b"

should be changed to this:

pattern="%h %l %{username}s %t &quot;%r&quot; %s %b"

This change is necessary because Data Foundation does not use Tomcat’s built-in authentication service. See the Tomcat Access Log documentation for more information.