| (Windows,
Linux, and Solaris) Create a batch file
(Windows) or shell script (Linux and Solaris)
to establish environment variables and JVM
options used when starting Tomcat. Name
this file setenv.bat (Windows) or setenv.sh
(Linux and Solaris) and store it in the
tomcat_root/bin directory. At Tomcat
startup, the catalina.bat file (Windows)
or catalina.sh file (Linux and Solaris)
automatically calls the setenv file. This
file must perform the following steps:
- Add ColdFusion binary file directories
to the system path. These directories
are as follows:
- ColdFusion MX binaries - cf_root/WEB_INF/cfusion/lib
- Verity binaries - cf_root/WEB_INF/cfusion/lib/platform/bin
(where platform is _nti40, _ilnx21,
or _solaris)
- jIntegra binaries (Windows only,
COM support)- cf_root/WEB-INF/cfusion/jintegra/bin
and cf_root/WEB-INF/cfusion/jintegra/bin/international
- Set JVM options to enable Sandbox Security,
graphing (only required for Linux and
Solaris), and CORBA support (CORBA support
is optional).
The following example Windows batch file
sets the system path and adds JVM options
to the JAVA_OPTS environment variable, which
is used in the startup command:
rem
Set a few variables.
set JAVA_HOME=c:\j2sdk1.4.0
set CF_HOME=C:\jakarta-tomcat-4.1.12\webapps\cfusion
set CF_WEB_INF=%CF_HOME%/WEB-INF
rem
Concatenate binary file directories into
a single variable.
set CF_SHARED_LIB=%CF_WEB_INF%/cfusion/lib
rem The following variable must be on a
single line.
set CF_SHARED_LIBS=%CF_SHARED_LIB%;%CF_SHARED_LIB%/_nti40/bin;
%CF_WEB_INF%/cfusion/jintegra/bin;
%CF_WEB_INF%/WEB-INF/cfusion/jintegra/bin/international
rem
Add libraries for binary files to the Windows
system path.
set PATH=%PATH%;%CF_SHARED_LIBS%
rem
Set JVM options to enable sandbox security
(all on one line).
set CF_SECURITY_JVM_OPTIONS=-Djava.security.manager
-Djava.security.policy="%CF_WEB_INF%/cfusion/lib/coldfusion.policy"
-Djava.security.auth.policy="%CF_WEB_INF%/cfusion/lib/neo_jaas.policy"
rem
Set JVM options for CORBA. Use if vbjorb.jar
is not in
rem your JRE's lib/ext directory.
rem set CF_CORBA_JVM_OPTIONS=-Xbootclasspath/a:"%CF_WEB_INF%/lib/vbjorb.jar"
rem
Consolidate JVM options.
rem * Use this line if you've configured
CORBA
rem set CF_JVM_OPTIONS=%CF_SECURITY_JVM_OPTIONS%
%CF_CORBA_JVM_OPTIONS%
rem * Use this line if you haven't configured
CORBA
set CF_JVM_OPTIONS=%CF_SECURITY_JVM_OPTIONS%
rem
Populate JAVA_OPTS, which will be used by
catalina.bat
rem when starting the JVM.
set JAVA_OPTS=%CF_JVM_OPTIONS%
The following example UNIX shell script
sets the system path and adds JVM options
to the JAVA_OPTS environment variable, which
is used in the startup command:
#
Establish variables
JAVA_HOME="/usr/java/jdk1.3.1_06"
CF_HOME="/opt/tomcat/webapps/cfusion"
CF_WEB_INF=$CF_HOME/WEB-INF
#
Add binary file directories to system path
CF_SHARED_LIB=$CF_WEB_INF/cfusion/lib
CF_SHARED_LIBS=$CF_SHARED_LIB:$CF_SHARED_LIB/_ilnx21/bin
LD_LIBRARY_PATH="$CF_SHARED_LIBS:$LD_LIBRARY_PATH"
#
Establish security JVM options (all on one
line).
CF_SECURITY_JVM_OPTIONS="-Djava.security.manager
-Djava.security.policy=$CF_WEB_INF/cfusion/lib/coldfusion.policy
-Djava.security.auth.policy=$CF_WEB_INF/cfusion/lib/neo_jaas.policy"
# Establish graphics JVM options (all on
one line).
CF_GRAPHICS_JVM_OPTIONS="-Xbootclasspath/a:$JAVA_HOME/lib/tools.jar:
$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/jre/lib/i18n.jar:
$CF_WEB_INF/cfusion/lib/webchartsJava2D.jar
-Djava.awt.graphicsenv=com.gp.java2d.ExGraphicsEnvironment"
# Set JVM options for CORBA. Use if vbjorb.jar
is not in your JRE's
# lib/ext directory.
If used, append $CF_CORBA_JVM_OPTIONS to
CF_JVM_OPTIONS
# CF_CORBA_JVM_OPTIONS=-Xbootclasspath/a:"$CF_WEB_INF/lib/vbjorb.jar"
CF_JVM_OPTIONS="$CF_SECURITY_JVM_OPTIONS
$CF_GRAPHICS_JVM_OPTIONS"
JAVA_OPTS="$CF_JVM_OPTIONS
-Xms128m -Xmx256m"
export
LD_LIBRARY_PATH |