# Run Tomcat as this user ID. Not setting this or leaving it blank will use the # default of tomcat{{ tomcat_version}}. TOMCAT{{ tomcat_version}}_USER={{ tomcat_user }} # Run Tomcat as this group ID. Not setting this or leaving it blank will use # the default of tomcat{{ tomcat_version}}. TOMCAT{{ tomcat_version}}_GROUP={{ tomcat_user }} # The home directory of the Java development kit (JDK). You need at least # JDK version 1.5. If JAVA_HOME is not set, some common directories for # OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried. {% if jdk_java_home is defined %} JAVA_HOME={{ jdk_java_home }} {% endif %} JAVA_OPTS="-server -Djava.awt.headless=true -Dfile.encoding={{ tomcat_file_encoding }}" {% if jdk_default <= 7 %} {% if tomcat_permgen_defined %} {% if tomcat_permgen_size is defined %} JAVA_OPTS="-XX:MaxPermSize={{ tomcat_permgen_size }} $JAVA_OPTS" {% endif %} {% endif %} {% endif %} {% if tomcat_java_opts is defined %} JAVA_OPTS="{{ tomcat_java_opts }} $JAVA_OPTS" {% endif %} {% if tomcat_java_gc_opts is defined %} JAVA_OPTS="${JAVA_OPTS} {{ tomcat_java_gc_opts }}" {% endif %} {% if tomcat_other_java_opts is defined %} JAVA_OPTS="${JAVA_OPTS} {{ tomcat_other_java_opts }}" {% endif %} {% if tomcat_jmx_enabled %} JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port={{ tomcat_jmx_port }} -Dcom.sun.management.jmxremote.ssl={{ tomcat_jmx_use_ssl }} -Dcom.sun.management.jmxremote.local.only={{ tomcat_jmx_localhost_only }}" {% if tomcat_jmx_auth_enabled %} JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file={{ tomcat_jmx_auth_dir }}/jmxremote.password -Dcom.sun.management.jmxremote.access.file={{ tomcat_jmx_auth_dir }}/jmxremote.access" {% else %} JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false" {% endif %} {% if tomcat_jmx_disable_additional_ports %} JAVA_OPTS="${JAVA_OPTS} -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremote.rmi.port={{ tomcat_jmx_port }}" {% endif %} {% endif %} {% if tomcat_enable_remote_debugging %} # You will be able to use a java debugger on port {{ tomcat_remote_debugging_port }}. JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,address={{ tomcat_remote_debugging_port }},server=y,suspend=n" # Obsolete #JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address={{ tomcat_remote_debugging_port }},server=y,suspend=n" {% endif %} # Location of the JVM temporary directory # WARNING: This directory will be destroyed and recreated at every startup ! JVM_TMP={{ tomcat_tmp_dir }} {% if catalina_tmp_directory is defined %} export CATALINA_TMPDIR={{ catalina_tmp_directory }} {% endif %} {% if tomcat_load_additional_default_conf %} if [ -f /etc/default/tomcat.local ] ; then . /etc/default/tomcat.local fi {% endif %}