Configuring Tomcat for TopBraid EDG
To run TopBraid EDG, an instance of Apache Tomcat must be provisioned and appropriately configured.
Supported Tomcat versions
Configuring CATALINA_OPTS
Warning
This is required for EDG 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/tomcat10and add:CATALINA_OPTS="$CATALINA_OPTS -Dedg.setup=/var/lib/tomcat10/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.shfile and add:CATALINA_OPTS="$CATALINA_OPTS -Dedg.setup=/var/lib/tomcat10/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.batfile and add:set "CATALINA_OPTS=%CATALINA_OPTS% -Dedg.setup="C:\Program Files\Apache Software Foundation\Tomcat 10.1\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 "%r" %s %b"
should be changed to this:
pattern="%h %l %{username}s %t "%r" %s %b"
This change is necessary because EDG does not use Tomcat’s built-in authentication service. See the Tomcat Access Log documentation for more information.