diff --git a/binary/bin-war/pom.xml b/binary/bin-war/pom.xml
index 8ac69b7f35..d6992bca66 100644
--- a/binary/bin-war/pom.xml
+++ b/binary/bin-war/pom.xml
@@ -9,7 +9,7 @@
http://www.geo-solutions.it
UTF-8
- 8.5.69
+ 9.0.90
${mapstore2.version}
diff --git a/binary/bin/mapstore2-shutdown.bat b/binary/bin/mapstore2-shutdown.bat
index 6ebd7de342..91bfb7f1e7 100644
--- a/binary/bin/mapstore2-shutdown.bat
+++ b/binary/bin/mapstore2-shutdown.bat
@@ -37,14 +37,14 @@ goto shutdown
echo The JAVA_HOME environment variable is not defined correctly.
goto JavaFail
-:JavaFail
- echo Java 7 is needed to run MapStore2.
- echo.
- echo Install it from:
- echo http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
- echo.
- set error=1
-goto end
+rem :JavaFail
+rem echo Java 7 is needed to run MapStore2.
+rem echo.
+rem echo Install it from:
+rem echo http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
+rem echo.
+rem set error=1
+rem goto end
:shutdown
echo Shutting down MapStore2...
diff --git a/binary/bin/mapstore2-startup.bat b/binary/bin/mapstore2-startup.bat
index a0d4f9bef9..14384905fd 100644
--- a/binary/bin/mapstore2-startup.bat
+++ b/binary/bin/mapstore2-startup.bat
@@ -33,14 +33,14 @@ goto run
echo The JAVA_HOME environment variable is not defined correctly.
goto JavaFail
-:JavaFail
- echo Java is needed to run MapStore2.
- echo.
- echo Install it from:
- echo http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
- echo.
- set error=1
-goto end
+rem :JavaFail
+rem echo Java is needed to run MapStore2.
+rem echo.
+rem echo Install it from:
+rem echo http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
+rem echo.
+rem set error=1
+rem goto end
:run
diff --git a/binary/pom.xml b/binary/pom.xml
index 09ab8d6bea..3f5deea1cb 100644
--- a/binary/pom.xml
+++ b/binary/pom.xml
@@ -14,7 +14,7 @@
http://www.geo-solutions.it
UTF-8
- 8.5.99
+ 9.0.90
${mapstore2.version}
@@ -117,7 +117,7 @@
-
\(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=tool-wrapper.sh
+
+# Check that target executable exists
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser "$@"
diff --git a/binary/tomcat/bin/commons-daemon.jar b/binary/tomcat/bin/commons-daemon.jar
index 8a4bbcf6c9..d72cf8b9eb 100644
Binary files a/binary/tomcat/bin/commons-daemon.jar and b/binary/tomcat/bin/commons-daemon.jar differ
diff --git a/binary/tomcat/bin/configtest.bat b/binary/tomcat/bin/configtest.bat
new file mode 100644
index 0000000000..c26b65d05b
--- /dev/null
+++ b/binary/tomcat/bin/configtest.bat
@@ -0,0 +1,58 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem Configuration test script for the CATALINA Server
+rem ---------------------------------------------------------------------------
+
+setlocal
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
+
+rem Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find "%EXECUTABLE%"
+echo This file is needed to run this program
+goto end
+:okExec
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" configtest %CMD_LINE_ARGS%
+
+:end
diff --git a/binary/tomcat/bin/configtest.sh b/binary/tomcat/bin/configtest.sh
new file mode 100644
index 0000000000..9a8ebffd73
--- /dev/null
+++ b/binary/tomcat/bin/configtest.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# -----------------------------------------------------------------------------
+# Configuration Test Script for the CATALINA Server
+# -----------------------------------------------------------------------------
+
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=catalina.sh
+
+# Check that target executable exists
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" configtest "$@"
diff --git a/binary/tomcat/bin/daemon.sh b/binary/tomcat/bin/daemon.sh
new file mode 100644
index 0000000000..014a350727
--- /dev/null
+++ b/binary/tomcat/bin/daemon.sh
@@ -0,0 +1,293 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -----------------------------------------------------------------------------
+# Commons Daemon wrapper script.
+# -----------------------------------------------------------------------------
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+DIRNAME="`dirname "$PRG"`"
+PROGRAM="`basename "$PRG"`"
+while [ ".$1" != . ]
+do
+ case "$1" in
+ --java-home )
+ JAVA_HOME="$2"
+ shift; shift;
+ continue
+ ;;
+ --catalina-home )
+ CATALINA_HOME="$2"
+ shift; shift;
+ continue
+ ;;
+ --catalina-base )
+ CATALINA_BASE="$2"
+ shift; shift;
+ continue
+ ;;
+ --catalina-pid )
+ CATALINA_PID="$2"
+ shift; shift;
+ continue
+ ;;
+ --tomcat-user )
+ TOMCAT_USER="$2"
+ shift; shift;
+ continue
+ ;;
+ --service-start-wait-time )
+ SERVICE_START_WAIT_TIME="$2"
+ shift; shift;
+ continue
+ ;;
+ * )
+ break
+ ;;
+ esac
+done
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+ Darwin*)
+ darwin=true
+ ;;
+esac
+
+# Use the maximum available, or set MAX_FD != -1 to use that
+test ".$MAX_FD" = . && MAX_FD="maximum"
+# Setup parameters for running the jsvc
+#
+test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat
+# Set JAVA_HOME to working JDK or JRE
+# If not set we'll try to guess the JAVA_HOME
+# from java binary if on the PATH
+#
+if [ -z "$JAVA_HOME" ]; then
+ JAVA_BIN="`which java 2>/dev/null || type java 2>&1`"
+ while [ -h "$JAVA_BIN" ]; do
+ ls=`ls -ld "$JAVA_BIN"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ JAVA_BIN="$link"
+ else
+ JAVA_BIN="`dirname "$JAVA_BIN"`/$link"
+ fi
+ done
+ test -x "$JAVA_BIN" && JAVA_HOME="`dirname "$JAVA_BIN"`"
+ test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
+else
+ JAVA_BIN="$JAVA_HOME/bin/java"
+fi
+
+# Only set CATALINA_HOME if not already set
+test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
+test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
+test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
+# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
+if [ -z "$JSVC" ]; then
+ JSVC="$CATALINA_BASE/bin/jsvc"
+ if [ ! -x "$JSVC" ]; then
+ JSVC="$CATALINA_HOME/bin/jsvc"
+ fi
+fi
+# Set the default service-start wait time if necessary
+test ".$SERVICE_START_WAIT_TIME" = . && SERVICE_START_WAIT_TIME=10
+
+# Ensure that any user defined CLASSPATH variables are not used on startup,
+# but allow them to be specified in setenv.sh, in rare case when it is needed.
+CLASSPATH=
+JAVA_OPTS=
+if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
+ . "$CATALINA_BASE/bin/setenv.sh"
+elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+ . "$CATALINA_HOME/bin/setenv.sh"
+fi
+
+# Add on extra jar files to CLASSPATH
+test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
+CLASSPATH="$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar"
+
+test ".$CATALINA_OUT" = . && CATALINA_OUT="$CATALINA_BASE/logs/catalina-daemon.out"
+test ".$CATALINA_TMP" = . && CATALINA_TMP="$CATALINA_BASE/temp"
+
+# Add tomcat-juli.jar to classpath
+# tomcat-juli.jar can be over-ridden per instance
+if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
+ CLASSPATH="$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar"
+else
+ CLASSPATH="$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar"
+fi
+
+# Check for the deprecated LOGGING_CONFIG
+# Only use it if CATALINA_LOGGING_CONFIG is not set and LOGGING_CONFIG starts with "-D..."
+if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
+ case $LOGGING_CONFIG in
+ -D*) CATALINA_LOGGING_CONFIG="$LOGGING_CONFIG"
+ esac
+fi
+
+# Set juli LogManager config file if it is present and an override has not been issued
+if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
+ if [ -r "$CATALINA_BASE/conf/logging.properties" ]; then
+ CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
+ else
+ # Bugzilla 45585
+ CATALINA_LOGGING_CONFIG="-Dnop"
+ fi
+fi
+
+test ".$LOGGING_MANAGER" = . && LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
+
+# Set -pidfile
+test ".$CATALINA_PID" = . && CATALINA_PID="$CATALINA_BASE/logs/catalina-daemon.pid"
+
+# Increase the maximum file descriptors if we can
+if [ "$cygwin" = "false" ]; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ "$?" -eq 0 ]; then
+ # Darwin does not allow RLIMIT_INFINITY on file soft limit
+ if [ "$darwin" = "true" ] && [ "$MAX_FD_LIMIT" = "unlimited" ]; then
+ MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
+ fi
+ test ".$MAX_FD" = ".maximum" && MAX_FD="$MAX_FD_LIMIT"
+ ulimit -n $MAX_FD
+ if [ "$?" -ne 0 ]; then
+ echo "$PROGRAM: Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ echo "$PROGRAM: Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# Set UMASK unless it has been overridden
+if [ -z "$UMASK" ]; then
+ UMASK="0027"
+fi
+umask $UMASK
+
+# Java 9 no longer supports the java.endorsed.dirs
+# system property. Only try to use it if
+# JAVA_ENDORSED_DIRS was explicitly set
+# or CATALINA_HOME/endorsed exists.
+ENDORSED_PROP=ignore.endorsed.dirs
+if [ -n "$JAVA_ENDORSED_DIRS" ]; then
+ ENDORSED_PROP=java.endorsed.dirs
+fi
+if [ -d "$CATALINA_HOME/endorsed" ]; then
+ ENDORSED_PROP=java.endorsed.dirs
+fi
+
+# ----- Execute The Requested Command -----------------------------------------
+case "$1" in
+ run )
+ shift
+ eval exec "\"$JSVC\"" $* \
+ "$JSVC_OPTS" \
+ -java-home "\"$JAVA_HOME\"" \
+ -pidfile "\"$CATALINA_PID\"" \
+ -wait $SERVICE_START_WAIT_TIME \
+ -umask $UMASK \
+ -nodetach \
+ -outfile "\"&1\"" \
+ -errfile "\"&2\"" \
+ -classpath "\"$CLASSPATH\"" \
+ "\"$CATALINA_LOGGING_CONFIG\"" "$JAVA_OPTS" "$CATALINA_OPTS" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -Dcatalina.base="\"$CATALINA_BASE\"" \
+ -Dcatalina.home="\"$CATALINA_HOME\"" \
+ -Djava.io.tmpdir="\"$CATALINA_TMP\"" \
+ $CATALINA_MAIN
+ exit $?
+ ;;
+ start )
+ eval "\"$JSVC\"" \
+ "$JSVC_OPTS" \
+ -java-home "\"$JAVA_HOME\"" \
+ -user $TOMCAT_USER \
+ -pidfile "\"$CATALINA_PID\"" \
+ -wait $SERVICE_START_WAIT_TIME \
+ -umask $UMASK \
+ -outfile "\"$CATALINA_OUT\"" \
+ -errfile "\"&1\"" \
+ -classpath "\"$CLASSPATH\"" \
+ "\"$CATALINA_LOGGING_CONFIG\"" "$JAVA_OPTS" "$CATALINA_OPTS" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -Dcatalina.base="\"$CATALINA_BASE\"" \
+ -Dcatalina.home="\"$CATALINA_HOME\"" \
+ -Djava.io.tmpdir="\"$CATALINA_TMP\"" \
+ $CATALINA_MAIN
+ exit $?
+ ;;
+ stop )
+ eval "\"$JSVC\"" \
+ "$JSVC_OPTS" \
+ -stop \
+ -pidfile "\"$CATALINA_PID\"" \
+ -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -Dcatalina.base="\"$CATALINA_BASE\"" \
+ -Dcatalina.home="\"$CATALINA_HOME\"" \
+ -Djava.io.tmpdir="\"$CATALINA_TMP\"" \
+ $CATALINA_MAIN
+ exit $?
+ ;;
+ version )
+ "$JSVC" \
+ -java-home "$JAVA_HOME" \
+ -pidfile "$CATALINA_PID" \
+ -classpath "$CLASSPATH" \
+ -errfile "&2" \
+ -version \
+ -check \
+ $CATALINA_MAIN
+ if [ "$?" = 0 ]; then
+ "$JAVA_BIN" \
+ -classpath "$CATALINA_HOME/lib/catalina.jar" \
+ org.apache.catalina.util.ServerInfo
+ fi
+ exit $?
+ ;;
+ * )
+ echo "Unknown command: '$1'"
+ echo "Usage: $PROGRAM ( commands ... )"
+ echo "commands:"
+ echo " run Start Tomcat without detaching from console"
+ echo " start Start Tomcat"
+ echo " stop Stop Tomcat"
+ echo " version What version of commons daemon and Tomcat"
+ echo " are you running?"
+ exit 1
+ ;;
+esac
diff --git a/binary/tomcat/bin/digest.bat b/binary/tomcat/bin/digest.bat
new file mode 100644
index 0000000000..2c1ffaec2d
--- /dev/null
+++ b/binary/tomcat/bin/digest.bat
@@ -0,0 +1,58 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem Script to digest password using the algorithm specified
+rem ---------------------------------------------------------------------------
+
+setlocal
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
+
+rem Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find "%EXECUTABLE%"
+echo This file is needed to run this program
+goto end
+:okExec
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
+
+:end
diff --git a/binary/tomcat/bin/digest.sh b/binary/tomcat/bin/digest.sh
new file mode 100644
index 0000000000..62ed5d0a1e
--- /dev/null
+++ b/binary/tomcat/bin/digest.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# -----------------------------------------------------------------------------
+# Script to digest password using the algorithm specified
+# -----------------------------------------------------------------------------
+
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=tool-wrapper.sh
+
+# Check that target executable exists
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"
diff --git a/binary/tomcat/bin/makebase.bat b/binary/tomcat/bin/makebase.bat
new file mode 100644
index 0000000000..bce8b2f0d4
--- /dev/null
+++ b/binary/tomcat/bin/makebase.bat
@@ -0,0 +1,114 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem This script creates the directory structure required for running Tomcat
+rem in a separate directory by pointing %CATALINA_BASE% to it. It copies the
+rem conf directory from %CATALINA_HOME%, and creates empty directories for
+rem bin, lib, logs, temp, webapps, and work.
+rem
+rem If the file %CATALINA_HOME%/bin/setenv.sh exists then it is copied to
+rem the target directory as well.
+rem
+rem Usage: makebase [-w | --webapps]
+
+setlocal
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto EOF
+:okHome
+
+rem first arg is the target directory
+set BASE_TGT=%1
+
+if %BASE_TGT%.==. (
+ rem target directory not provided; exit
+ echo Usage: makebase ^
+ goto :EOF
+)
+
+set COPY_WEBAPPS=false
+
+rem parse args
+for %%a in (%*) do (
+ if "%%~a"=="--webapps" (
+ set COPY_WEBAPPS=true
+ )
+ if "%%~a"=="-w" (
+ set COPY_WEBAPPS=true
+ )
+)
+
+if exist %BASE_TGT% (
+ rem target directory exists
+ echo Target directory exists
+
+ rem exit if target directory is not empty
+ for /F %%i in ('dir /b %BASE_TGT%\*.*') do (
+ echo Target directory is not empty
+ goto :EOF
+ )
+) else (
+ rem create the target directory
+ mkdir %BASE_TGT%
+)
+
+rem create empty directories
+for %%d in (bin, conf, lib, logs, temp, webapps, work) do (
+ mkdir %BASE_TGT%\%%d
+)
+
+if "%COPY_WEBAPPS%" == "true" (
+ echo Copying webapps
+ robocopy %CATALINA_HOME%\webapps %BASE_TGT%\webapps /E > nul
+ rem copy conf directory recursively
+ robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf /E > nul
+) else (
+ rem copy conf directory without subdirectories and suppress warning
+ robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf > nul
+ rem create empty ROOT directory
+ mkdir %BASE_TGT%\webapps\ROOT
+)
+
+rem copy setenv.bat if exists
+robocopy %CATALINA_HOME%\bin %BASE_TGT%\bin setenv.bat > nul
+
+echo Created CATALINA_BASE directory at %BASE_TGT%
+
+echo.
+echo You can launch the new instance by running:
+echo set CATALINA_HOME=%CATALINA_HOME%
+echo set CATALINA_BASE=%BASE_TGT%
+echo %%CATALINA_HOME%%/bin/catalina.bat run
+
+echo.
+echo Attention: The ports in conf\server.xml might be bound by a
+echo different instance. Please review your config files
+echo and update them where necessary.
+echo.
+
+:EOF
diff --git a/binary/tomcat/bin/makebase.sh b/binary/tomcat/bin/makebase.sh
new file mode 100644
index 0000000000..2b6eada5c8
--- /dev/null
+++ b/binary/tomcat/bin/makebase.sh
@@ -0,0 +1,115 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This script creates the directory structure required for running Tomcat
+# in a separate directory by pointing $CATALINA_BASE to it. It copies the
+# conf directory from $CATALINA_HOME, and creates empty directories for
+# bin, lib, logs, temp, webapps, and work.
+#
+# If the file $CATALINA_HOME/bin/setenv.sh exists then it is copied to
+# the target directory as well.
+#
+# Usage: makebase [-w | --webapps]
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CATALINA_HOME if not already set
+[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
+
+# first arg is the target directory
+BASE_TGT=$1
+
+if [ -z "$BASE_TGT" ]; then
+ # target directory not provided; exit
+ echo "Usage: makebase "
+ exit 1
+fi
+
+COPY_WEBAPPS=false
+
+# parse args
+while [ "$1" != "" ]; do
+ case $1 in
+ -w | --webapps)
+ COPY_WEBAPPS=true
+ ;;
+ esac
+ shift
+done
+
+if [ -d "$BASE_TGT" ]; then
+ # target directory exists
+ echo "Target directory exists"
+
+ # exit if target directory is not empty
+ [ "`ls -A "$BASE_TGT"`" ] && \
+ echo "Target directory is not empty" && \
+ exit 1
+else
+ # create the target directory
+ mkdir -p "$BASE_TGT"
+fi
+
+for dir in bin conf lib logs temp webapps work;
+do
+ # create empty directories
+ mkdir "$BASE_TGT/$dir"
+done
+
+if [ "$COPY_WEBAPPS" = true ]; then
+ echo "Copying webapps"
+ cp -r "$CATALINA_HOME/webapps" "$BASE_TGT/"
+ # copy conf directory recursively
+ cp -r "$CATALINA_HOME/conf" "$BASE_TGT/"
+else
+ # copy conf directory without subdirectories and suppress warning
+ cp "${CATALINA_HOME}/conf"/* "$BASE_TGT/conf" 2> /dev/null
+ # create empty ROOT directory
+ mkdir "$BASE_TGT/webapps/ROOT"
+fi
+
+# copy setenv.sh if exists
+[ -f "$CATALINA_HOME/bin/setenv.sh" ] && \
+ cp "$CATALINA_HOME/bin/setenv.sh" "$BASE_TGT/bin/"
+
+echo "Created CATALINA_BASE directory at $BASE_TGT"
+
+echo
+echo "You can launch the new instance by running:"
+echo " export CATALINA_HOME=$CATALINA_HOME"
+echo " export CATALINA_BASE=$BASE_TGT"
+echo " \$CATALINA_HOME/bin/catalina.sh run"
+
+echo
+echo "Attention: The ports in conf/server.xml might be bound by a "
+echo " different instance. Please review your config files "
+echo " and update them as necessary."
+echo
diff --git a/binary/tomcat/bin/service.bat b/binary/tomcat/bin/service.bat
new file mode 100644
index 0000000000..79a53768ef
--- /dev/null
+++ b/binary/tomcat/bin/service.bat
@@ -0,0 +1,251 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem NT Service Install/Uninstall script
+rem
+rem Usage: service.bat install/remove [service_name [--rename]] [--user username]
+rem
+rem Options
+rem install Install the service using default settings.
+rem remove Remove the service from the system.
+rem
+rem service_name (optional) The name to use for the service. If not specified,
+rem Tomcat9 is used as the service name.
+rem
+rem --rename (optional) Rename tomcat9.exe and tomcat9w.exe to match
+rem the non-default service name.
+rem
+rem username (optional) The name of the OS user to use to install/remove
+rem the service (not the name of the OS user the
+rem service will run as). If not specified, the current
+rem user is used.
+rem ---------------------------------------------------------------------------
+
+setlocal
+
+set "SELF=%~dp0%service.bat"
+
+set DEFAULT_SERVICE_NAME=Tomcat9
+set SERVICE_NAME=%DEFAULT_SERVICE_NAME%
+
+set "CURRENT_DIR=%cd%"
+
+rem Parse the arguments
+if "x%1x" == "xx" goto displayUsage
+set SERVICE_CMD=%1
+shift
+if "x%1x" == "xx" goto checkEnv
+:checkUser
+if "x%1x" == "x/userx" goto runAsUser
+if "x%1x" == "x--userx" goto runAsUser
+set SERVICE_NAME=%1
+shift
+if "x%1x" == "xx" goto checkEnv
+if "x%1x" == "x--renamex" (
+ set RENAME=%1
+ shift
+)
+if "x%1x" == "xx" goto checkEnv
+goto checkUser
+:runAsUser
+shift
+if "x%1x" == "xx" goto displayUsage
+set SERVICE_USER=%1
+shift
+runas /env /savecred /user:%SERVICE_USER% "%COMSPEC% /K \"%SELF%\" %SERVICE_CMD% %SERVICE_NAME%"
+exit /b 0
+
+rem Check the environment
+:checkEnv
+
+rem Guess CATALINA_HOME if not defined
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%cd%"
+if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" goto gotHome
+if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" goto gotHome
+rem CD to the upper dir
+cd ..
+set "CATALINA_HOME=%cd%"
+:gotHome
+if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
+ set "EXECUTABLE=%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe"
+ goto okHome
+)
+if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
+ set "EXECUTABLE=%CATALINA_HOME%\bin\%SERVICE_NAME%.exe"
+ goto okHome
+)
+if "%DEFAULT_SERVICE_NAME%"== "%SERVICE_NAME%" (
+ echo The file %DEFAULT_SERVICE_NAME%.exe was not found...
+) else (
+ echo Neither the %DEFAULT_SERVICE_NAME%.exe file nor the %SERVICE_NAME%.exe file was found...
+)
+echo Either the CATALINA_HOME environment variable is not defined correctly or
+echo the incorrect service name has been used.
+echo Both the CATALINA_HOME environment variable and the correct service name
+echo are required to run this program.
+exit /b 1
+:okHome
+cd "%CURRENT_DIR%"
+
+rem Make sure prerequisite environment variables are set
+if not "%JRE_HOME%" == "" goto gotJreHome
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
+echo Service will try to guess them from the registry.
+goto okJava
+
+:gotJavaHome
+rem No JRE given, check if JAVA_HOME is usable as JRE_HOME
+rem Java 9 has a different directory structure
+if exist "%JAVA_HOME%\jre\bin\java.exe" goto preJava9Layout
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHomeAsJre
+rem Use JAVA_HOME as JRE_HOME
+set "JRE_HOME=%JAVA_HOME%"
+goto okJava
+
+:preJava9Layout
+rem Use JAVA_HOME\jre as JRE_HOME
+set "JRE_HOME=%JAVA_HOME%\jre"
+goto okJava
+
+:noJavaHomeAsJre
+echo The JAVA_HOME environment variable is not defined correctly.
+echo JAVA_HOME=%JAVA_HOME%
+echo NB: JAVA_HOME should point to a JDK not a JRE.
+exit /b 1
+
+:gotJreHome
+rem Check if we have a usable JRE
+if not exist "%JRE_HOME%\bin\java.exe" goto noJreHome
+goto okJava
+
+:noJreHome
+rem Needed at least a JRE
+echo The JRE_HOME environment variable is not defined correctly
+echo JRE_HOME=%JRE_HOME%
+echo This environment variable is needed to run this program
+exit /b 1
+
+:okJava
+if not "%CATALINA_BASE%" == "" goto gotBase
+set "CATALINA_BASE=%CATALINA_HOME%"
+
+:gotBase
+rem Java 9 no longer supports the java.endorsed.dirs
+rem system property. Only try to use it if
+rem JAVA_ENDORSED_DIRS was explicitly set
+rem or CATALINA_HOME/endorsed exists.
+set ENDORSED_PROP=ignore.endorsed.dirs
+if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar
+set ENDORSED_PROP=java.endorsed.dirs
+goto doneEndorsed
+:noEndorsedVar
+if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed
+set ENDORSED_PROP=java.endorsed.dirs
+:doneEndorsed
+
+rem Process the requested command
+if /i %SERVICE_CMD% == install goto doInstall
+if /i %SERVICE_CMD% == remove goto doRemove
+if /i %SERVICE_CMD% == uninstall goto doRemove
+echo Unknown parameter "%SERVICE_CMD%"
+:displayUsage
+echo.
+echo Usage: service.bat install/remove [service_name [--rename]] [--user username]
+exit /b 1
+
+:doRemove
+rem Remove the service
+echo Removing the service '%SERVICE_NAME%' ...
+echo Using CATALINA_BASE: "%CATALINA_BASE%"
+
+"%EXECUTABLE%" //DS//%SERVICE_NAME% ^
+ --LogPath "%CATALINA_BASE%\logs"
+if not errorlevel 1 goto removed
+echo Failed removing '%SERVICE_NAME%' service
+exit /b 1
+:removed
+echo The service '%SERVICE_NAME%' has been removed
+if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
+ rename "%SERVICE_NAME%.exe" "%DEFAULT_SERVICE_NAME%.exe"
+ rename "%SERVICE_NAME%w.exe" "%DEFAULT_SERVICE_NAME%w.exe"
+)
+exit /b 0
+
+:doInstall
+rem Install the service
+echo Installing the service '%SERVICE_NAME%' ...
+echo Using CATALINA_HOME: "%CATALINA_HOME%"
+echo Using CATALINA_BASE: "%CATALINA_BASE%"
+echo Using JAVA_HOME: "%JAVA_HOME%"
+echo Using JRE_HOME: "%JRE_HOME%"
+
+rem Try to use the server jvm
+set "JVM=%JRE_HOME%\bin\server\jvm.dll"
+if exist "%JVM%" goto foundJvm
+rem Try to use the client jvm
+set "JVM=%JRE_HOME%\bin\client\jvm.dll"
+if exist "%JVM%" goto foundJvm
+echo Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME.
+set JVM=auto
+:foundJvm
+echo Using JVM: "%JVM%"
+
+set "CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar"
+if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
+
+if "%SERVICE_STARTUP_MODE%" == "" set SERVICE_STARTUP_MODE=manual
+if "%JvmMs%" == "" set JvmMs=128
+if "%JvmMx%" == "" set JvmMx=256
+
+if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
+ if "x%RENAME%x" == "x--renamex" (
+ rename "%DEFAULT_SERVICE_NAME%.exe" "%SERVICE_NAME%.exe"
+ rename "%DEFAULT_SERVICE_NAME%w.exe" "%SERVICE_NAME%w.exe"
+ set "EXECUTABLE=%CATALINA_HOME%\bin\%SERVICE_NAME%.exe"
+ )
+)
+
+"%EXECUTABLE%" //IS//%SERVICE_NAME% ^
+ --Description "Apache Tomcat 9.0.90 Server - https://tomcat.apache.org/" ^
+ --DisplayName "Apache Tomcat 9.0 %SERVICE_NAME%" ^
+ --Install "%EXECUTABLE%" ^
+ --LogPath "%CATALINA_BASE%\logs" ^
+ --StdOutput auto ^
+ --StdError auto ^
+ --Classpath "%CLASSPATH%" ^
+ --Jvm "%JVM%" ^
+ --StartMode jvm ^
+ --StopMode jvm ^
+ --StartPath "%CATALINA_HOME%" ^
+ --StopPath "%CATALINA_HOME%" ^
+ --StartClass org.apache.catalina.startup.Bootstrap ^
+ --StopClass org.apache.catalina.startup.Bootstrap ^
+ --StartParams start ^
+ --StopParams stop ^
+ --JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-D%ENDORSED_PROP%=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;%JvmArgs%" ^
+ --JvmOptions9 "--add-opens=java.base/java.lang=ALL-UNNAMED#--add-opens=java.base/java.io=ALL-UNNAMED#--add-opens=java.base/java.util=ALL-UNNAMED#--add-opens=java.base/java.util.concurrent=ALL-UNNAMED#--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED" ^
+ --Startup "%SERVICE_STARTUP_MODE%" ^
+ --JvmMs "%JvmMs%" ^
+ --JvmMx "%JvmMx%"
+if not errorlevel 1 goto installed
+echo Failed installing '%SERVICE_NAME%' service
+exit /b 1
+:installed
+echo The service '%SERVICE_NAME%' has been installed.
+exit /b 0
diff --git a/binary/tomcat/bin/setclasspath.bat b/binary/tomcat/bin/setclasspath.bat
index 12da138fa5..bd3a2f1a9d 100644
--- a/binary/tomcat/bin/setclasspath.bat
+++ b/binary/tomcat/bin/setclasspath.bat
@@ -43,13 +43,23 @@ goto okJava
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly.
+echo JAVA_HOME=%JAVA_HOME%
echo It is needed to run this program in debug mode.
echo NB: JAVA_HOME should point to a JDK not a JRE.
goto exit
:gotJavaHome
-rem No JRE given, use JAVA_HOME as JRE_HOME
+rem No JRE given, check if JAVA_HOME is usable as JRE_HOME
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHomeAsJre
+rem Use JAVA_HOME as JRE_HOME
set "JRE_HOME=%JAVA_HOME%"
+goto okJava
+
+:noJavaHomeAsJre
+echo The JAVA_HOME environment variable is not defined correctly.
+echo JAVA_HOME=%JAVA_HOME%
+echo NB: JAVA_HOME should point to a JDK not a JRE.
+goto exit
:gotJreHome
rem Check if we have a usable JRE
@@ -59,6 +69,7 @@ goto okJava
:noJreHome
rem Needed at least a JRE
echo The JRE_HOME environment variable is not defined correctly
+echo JRE_HOME=%JRE_HOME%
echo This environment variable is needed to run this program
goto exit
@@ -76,13 +87,13 @@ rem Don't override _RUNJAVA if the user has set it previously
if not "%_RUNJAVA%" == "" goto gotRunJava
rem Set standard command for invoking Java.
rem Also note the quoting as JRE_HOME may contain spaces.
-set _RUNJAVA="%JRE_HOME%\bin\java.exe"
+set "_RUNJAVA=%JRE_HOME%\bin\java.exe"
:gotRunJava
rem Don't override _RUNJDB if the user has set it previously
rem Also note the quoting as JAVA_HOME may contain spaces.
if not "%_RUNJDB%" == "" goto gotRunJdb
-set _RUNJDB="%JAVA_HOME%\bin\jdb.exe"
+set "_RUNJDB=%JAVA_HOME%\bin\jdb.exe"
:gotRunJdb
goto end
diff --git a/binary/tomcat/bin/setclasspath.sh b/binary/tomcat/bin/setclasspath.sh
index 4ae4b6a149..77f1cb2882 100644
--- a/binary/tomcat/bin/setclasspath.sh
+++ b/binary/tomcat/bin/setclasspath.sh
@@ -54,15 +54,13 @@ if [ -z "$JAVA_HOME" ] && [ "$1" = "debug" ]; then
echo "JAVA_HOME should point to a JDK in order to run in debug mode."
exit 1
fi
-if [ -z "$JRE_HOME" ]; then
- JRE_HOME="$JAVA_HOME"
-fi
# If we're running under jdb, we need a full jdk.
if [ "$1" = "debug" ] ; then
if [ "$os400" = "true" ]; then
if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
echo "The JAVA_HOME environment variable is not defined correctly"
+ echo "JAVA_HOME=$JAVA_HOME"
echo "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"
exit 1
@@ -70,6 +68,7 @@ if [ "$1" = "debug" ] ; then
else
if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/jdb ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
echo "The JAVA_HOME environment variable is not defined correctly"
+ echo "JAVA_HOME=$JAVA_HOME"
echo "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"
exit 1
@@ -77,6 +76,25 @@ if [ "$1" = "debug" ] ; then
fi
fi
+if [ -z "$JRE_HOME" ]; then
+ # JAVA_HOME_MUST be set
+ if [ ! -x "$JAVA_HOME"/bin/java ]; then
+ echo "The JAVA_HOME environment variable is not defined correctly"
+ echo "JAVA_HOME=$JAVA_HOME"
+ echo "This environment variable is needed to run this program"
+ echo "NB: JAVA_HOME should point to a JDK not a JRE"
+ exit 1
+ fi
+ JRE_HOME="$JAVA_HOME"
+else
+ if [ ! -x "$JRE_HOME"/bin/java ]; then
+ echo "The JRE_HOME environment variable is not defined correctly"
+ echo "JRE_HOME=$JRE_HOME"
+ echo "This environment variable is needed to run this program"
+ exit 1
+ fi
+fi
+
# Don't override the endorsed dir if the user has set it previously
if [ -z "$JAVA_ENDORSED_DIRS" ]; then
# Java 9 no longer supports the java.endorsed.dirs
diff --git a/binary/tomcat/bin/tcnative-1.dll b/binary/tomcat/bin/tcnative-1.dll
new file mode 100644
index 0000000000..18d2f49741
Binary files /dev/null and b/binary/tomcat/bin/tcnative-1.dll differ
diff --git a/binary/tomcat/bin/tomcat-juli.jar b/binary/tomcat/bin/tomcat-juli.jar
index 294557fd33..c289baa9e6 100644
Binary files a/binary/tomcat/bin/tomcat-juli.jar and b/binary/tomcat/bin/tomcat-juli.jar differ
diff --git a/binary/tomcat/bin/tomcat9.exe b/binary/tomcat/bin/tomcat9.exe
new file mode 100644
index 0000000000..84469d4f81
Binary files /dev/null and b/binary/tomcat/bin/tomcat9.exe differ
diff --git a/binary/tomcat/bin/tomcat9w.exe b/binary/tomcat/bin/tomcat9w.exe
new file mode 100644
index 0000000000..793dcc1ae6
Binary files /dev/null and b/binary/tomcat/bin/tomcat9w.exe differ
diff --git a/binary/tomcat/bin/tool-wrapper.bat b/binary/tomcat/bin/tool-wrapper.bat
new file mode 100644
index 0000000000..5d91999fa5
--- /dev/null
+++ b/binary/tomcat/bin/tool-wrapper.bat
@@ -0,0 +1,110 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem Wrapper script for command line tools
+rem
+rem Environment Variable Prerequisites
+rem
+rem CATALINA_HOME May point at your Catalina "build" directory.
+rem
+rem TOOL_OPTS (Optional) Java runtime options.
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem Using JRE_HOME instead works as well.
+rem
+rem JRE_HOME Must point at your Java Runtime installation.
+rem Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
+rem are both set, JRE_HOME is used.
+rem
+rem JAVA_OPTS (Optional) Java runtime options.
+rem
+rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
+rem containing some jars in order to allow replacement of APIs
+rem created outside of the JCP (i.e. DOM and SAX from W3C).
+rem It can also be used to update the XML parser implementation.
+rem This is only supported for Java <= 8.
+rem Defaults to $CATALINA_HOME/endorsed.
+rem ---------------------------------------------------------------------------
+
+setlocal
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+rem Ensure that any user defined CLASSPATH variables are not used on startup,
+rem but allow them to be specified in setenv.bat, in rare case when it is needed.
+set CLASSPATH=
+
+rem Get standard environment variables
+if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
+
+rem Get standard Java environment variables
+if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
+echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
+echo This file is needed to run this program
+goto end
+:okSetclasspath
+call "%CATALINA_HOME%\bin\setclasspath.bat" %1
+if errorlevel 1 goto end
+
+rem Add on extra jar files to CLASSPATH
+rem Note that there are no quotes as we do not want to introduce random
+rem quotes into the CLASSPATH
+if "%CLASSPATH%" == "" goto emptyClasspath
+set "CLASSPATH=%CLASSPATH%;"
+:emptyClasspath
+set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\tomcat-util.jar"
+
+set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
+
+rem Java 9 no longer supports the java.endorsed.dirs
+rem system property. Only try to use it if
+rem JAVA_ENDORSED_DIRS was explicitly set
+rem or CATALINA_HOME/endorsed exists.
+set ENDORSED_PROP=ignore.endorsed.dirs
+if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar
+set ENDORSED_PROP=java.endorsed.dirs
+goto doneEndorsed
+:noEndorsedVar
+if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed
+set ENDORSED_PROP=java.endorsed.dirs
+:doneEndorsed
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
+
+:end
diff --git a/binary/tomcat/bin/tool-wrapper.sh b/binary/tomcat/bin/tool-wrapper.sh
new file mode 100644
index 0000000000..863ca496cd
--- /dev/null
+++ b/binary/tomcat/bin/tool-wrapper.sh
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# -----------------------------------------------------------------------------
+# Wrapper script for command line tools
+#
+# Environment Variable Prerequisites
+#
+# CATALINA_HOME May point at your Catalina "build" directory.
+#
+# TOOL_OPTS (Optional) Java runtime options.
+#
+# JAVA_HOME Must point at your Java Development Kit installation.
+# Using JRE_HOME instead works as well.
+#
+# JRE_HOME Must point at your Java Runtime installation.
+# Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
+# are both set, JRE_HOME is used.
+#
+# JAVA_OPTS (Optional) Java runtime options.
+#
+# JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
+# containing some jars in order to allow replacement of APIs
+# created outside of the JCP (i.e. DOM and SAX from W3C).
+# It can also be used to update the XML parser implementation.
+# This is only supported for Java <= 8.
+# Defaults to $CATALINA_HOME/endorsed.
+# -----------------------------------------------------------------------------
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false
+darwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+Darwin*) darwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CATALINA_HOME if not already set
+[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
+
+# Ensure that any user defined CLASSPATH variables are not used on startup,
+# but allow them to be specified in setenv.sh, in rare case when it is needed.
+CLASSPATH=
+
+if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+ . "$CATALINA_HOME/bin/setenv.sh"
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
+ [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
+ [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For OS400
+if $os400; then
+ # Set job priority to standard for interactive (interactive - 6) by using
+ # the interactive priority - 6, the helper threads that respond to requests
+ # will be running at the same priority as interactive jobs.
+ COMMAND='chgjob job('$JOBNAME') runpty(6)'
+ system $COMMAND
+
+ # Enable multi threading
+ export QIBM_MULTI_THREADED=Y
+fi
+
+# Get standard Java environment variables
+if $os400; then
+ # -r will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ . "$CATALINA_HOME"/bin/setclasspath.sh
+else
+ if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
+ . "$CATALINA_HOME"/bin/setclasspath.sh
+ else
+ echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+# Add on extra jar files to CLASSPATH
+if [ ! -z "$CLASSPATH" ] ; then
+ CLASSPATH="$CLASSPATH":
+fi
+CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/tomcat-juli.jar:"$CATALINA_HOME"/lib/servlet-api.jar:"$CATALINA_HOME"/lib/tomcat-util.jar
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+ JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
+ CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$JAVA_ENDORSED_DIRS" ] && JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+# Java 9 no longer supports the java.endorsed.dirs
+# system property. Only try to use it if
+# JAVA_ENDORSED_DIRS was explicitly set
+# or CATALINA_HOME/endorsed exists.
+ENDORSED_PROP=ignore.endorsed.dirs
+if [ -n "$JAVA_ENDORSED_DIRS" ]; then
+ ENDORSED_PROP=java.endorsed.dirs
+fi
+if [ -d "$CATALINA_HOME/endorsed" ]; then
+ ENDORSED_PROP=java.endorsed.dirs
+fi
+
+JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+
+# ----- Execute The Requested Command -----------------------------------------
+
+eval exec "\"$_RUNJAVA\"" "$JAVA_OPTS" "$TOOL_OPTS" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
+ -Dcatalina.home="\"$CATALINA_HOME\"" \
+ org.apache.catalina.startup.Tool "$@"
diff --git a/binary/tomcat/bin/version.bat b/binary/tomcat/bin/version.bat
new file mode 100644
index 0000000000..6c807bb9d3
--- /dev/null
+++ b/binary/tomcat/bin/version.bat
@@ -0,0 +1,58 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem Version script for the CATALINA Server
+rem ---------------------------------------------------------------------------
+
+setlocal
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
+
+rem Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find "%EXECUTABLE%"
+echo This file is needed to run this program
+goto end
+:okExec
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" version %CMD_LINE_ARGS%
+
+:end
diff --git a/binary/tomcat/bin/version.sh b/binary/tomcat/bin/version.sh
new file mode 100644
index 0000000000..1cb19bdaa0
--- /dev/null
+++ b/binary/tomcat/bin/version.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# -----------------------------------------------------------------------------
+# Version Script for the CATALINA Server
+# -----------------------------------------------------------------------------
+
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=catalina.sh
+
+# Check that target executable exists
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" version "$@"
diff --git a/binary/tomcat/conf/catalina.policy b/binary/tomcat/conf/catalina.policy
index 5cfab095d8..7aab95dee5 100644
--- a/binary/tomcat/conf/catalina.policy
+++ b/binary/tomcat/conf/catalina.policy
@@ -89,7 +89,6 @@ grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
permission java.util.PropertyPermission "java.util.logging.config.class", "read";
permission java.util.PropertyPermission "java.util.logging.config.file", "read";
- permission java.util.PropertyPermission "org.apache.juli.AsyncLoggerPollInterval", "read";
permission java.util.PropertyPermission "org.apache.juli.AsyncMaxRecordCount", "read";
permission java.util.PropertyPermission "org.apache.juli.AsyncOverflowDropType", "read";
permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read";
@@ -262,4 +261,4 @@ grant codeBase "file:${catalina.home}/webapps/host-manager/-" {
//
// The permissions granted to a specific JAR
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
-// };
+// };
\ No newline at end of file
diff --git a/binary/tomcat/conf/catalina.properties b/binary/tomcat/conf/catalina.properties
index dc2186f991..38ce4c1063 100644
--- a/binary/tomcat/conf/catalina.properties
+++ b/binary/tomcat/conf/catalina.properties
@@ -108,23 +108,25 @@ shared.loader=
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
annotations-api.jar,\
ant-junit*.jar,\
-ant-launcher.jar,\
-ant.jar,\
+ant-launcher*.jar,\
+ant*.jar,\
asm-*.jar,\
aspectj*.jar,\
+bcel*.jar,\
+biz.aQute.bnd*.jar,\
bootstrap.jar,\
catalina-ant.jar,\
catalina-ha.jar,\
-catalina-jmx-remote.jar,\
+catalina-ssi.jar,\
catalina-storeconfig.jar,\
catalina-tribes.jar,\
-catalina-ws.jar,\
catalina.jar,\
cglib-*.jar,\
cobertura-*.jar,\
commons-beanutils*.jar,\
commons-codec*.jar,\
commons-collections*.jar,\
+commons-compress*.jar,\
commons-daemon.jar,\
commons-dbcp*.jar,\
commons-digester*.jar,\
@@ -135,12 +137,14 @@ commons-lang*.jar,\
commons-logging*.jar,\
commons-math*.jar,\
commons-pool*.jar,\
+derby-*.jar,\
dom4j-*.jar,\
easymock-*.jar,\
ecj-*.jar,\
el-api.jar,\
geronimo-spec-jaxrpc*.jar,\
h2*.jar,\
+ha-api-*.jar,\
hamcrest-*.jar,\
hibernate*.jar,\
httpclient*.jar,\
@@ -150,6 +154,7 @@ jasper.jar,\
jaspic-api.jar,\
jaxb-*.jar,\
jaxen-*.jar,\
+jaxws-rt-*.jar,\
jdom-*.jar,\
jetty-*.jar,\
jmx-tools.jar,\
@@ -163,6 +168,8 @@ log4j*.jar,\
mail*.jar,\
objenesis-*.jar,\
oraclepki.jar,\
+org.hamcrest.core_*.jar,\
+org.junit_*.jar,\
oro-*.jar,\
servlet-api-*.jar,\
servlet-api.jar,\
@@ -181,6 +188,7 @@ tomcat-util-scan.jar,\
tomcat-util.jar,\
tomcat-websocket.jar,\
tools.jar,\
+unboundid-ldapsdk-*.jar,\
websocket-api.jar,\
wsdl4j*.jar,\
xercesImpl.jar,\
@@ -206,9 +214,6 @@ tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000
-# This system property is deprecated. Use the relaxedPathChars relaxedQueryChars
-# attributes of the Connector instead. These attributes permit a wider range of
-# characters to be configured as valid.
-# Allow for changes to HTTP request validation
-# WARNING: Using this option may expose the server to CVE-2016-6816
-#tomcat.util.http.parser.HttpParser.requestTargetAllow=|
+# Disable use of some privilege blocks Tomcat doesn't need since calls to the
+# code in question are always already inside a privilege block
+org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED=false
diff --git a/binary/tomcat/conf/context.xml b/binary/tomcat/conf/context.xml
index 745bf9537b..4f6fc0cd97 100644
--- a/binary/tomcat/conf/context.xml
+++ b/binary/tomcat/conf/context.xml
@@ -1,4 +1,4 @@
-
+
-
+
+
WEB-INF/web.xml
+ WEB-INF/tomcat-web.xml
+ ${catalina.base}/conf/web.xml
-
-
-
-
-
\ No newline at end of file
+
diff --git a/binary/tomcat/conf/logging.properties b/binary/tomcat/conf/logging.properties
index dc5dc7c9d3..e8b7b16bc4 100644
--- a/binary/tomcat/conf/logging.properties
+++ b/binary/tomcat/conf/logging.properties
@@ -25,21 +25,25 @@ handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.jul
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
+1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90
1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
+2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90
2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8
3manager.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
+3manager.org.apache.juli.AsyncFileHandler.maxDays = 90
3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
+4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 90
4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
java.util.logging.ConsoleHandler.level = FINE
diff --git a/binary/tomcat/conf/server.xml b/binary/tomcat/conf/server.xml
index 64e6b86a0e..f368087544 100644
--- a/binary/tomcat/conf/server.xml
+++ b/binary/tomcat/conf/server.xml
@@ -68,25 +68,30 @@
-->
+ redirectPort="8443"
+ maxParameterCount="1000"
+ />
@@ -73,7 +73,7 @@
-
+
@@ -107,8 +107,10 @@
-
-
+
+
+
+
default
@@ -148,9 +150,9 @@
-
+
-
+
@@ -190,7 +192,8 @@
-
+
+
@@ -243,7 +246,13 @@
-
+
+
+
+
+
+
+
@@ -354,7 +363,7 @@
-
+
@@ -365,7 +374,7 @@
-
+
@@ -1761,6 +1770,10 @@
ggb
application/vnd.geogebra.file
+
+ ggs
+ application/vnd.geogebra.slides
+
ggt
application/vnd.geogebra.tool
@@ -2115,7 +2128,7 @@
js
- application/javascript
+ text/javascript
jsf
@@ -2465,6 +2478,10 @@
mjp2
video/mj2
+
+ mjs
+ text/javascript
+
mk3d
video/x-matroska
@@ -2903,6 +2920,10 @@
oprc
application/vnd.palm
+
+ opus
+ audio/ogg
+
org
application/vnd.lotus-organizer
@@ -4720,7 +4741,7 @@
-
+
index.html