tomcat升级为7.0.85
diff --git a/tomcat-7/bin/bootstrap.jar b/tomcat-7/bin/bootstrap.jar
index 1ca4e9f..31a10e2 100644
--- a/tomcat-7/bin/bootstrap.jar
+++ b/tomcat-7/bin/bootstrap.jar
Binary files differ
diff --git a/tomcat-7/bin/catalina.bat b/tomcat-7/bin/catalina.bat
index 30e147b..e70c14a 100644
--- a/tomcat-7/bin/catalina.bat
+++ b/tomcat-7/bin/catalina.bat
@@ -22,6 +22,16 @@
rem Do not set the variables in this script. Instead put them into a script
rem setenv.bat in CATALINA_BASE/bin to keep your customizations separate.
rem
+rem WHEN RUNNING TOMCAT AS A WINDOWS SERVICE:
+rem Note that the environment variables that affect the behavior of this
+rem script will have no effect at all on Windows Services. As such, any
+rem local customizations made in a CATALINA_BASE/bin/setenv.bat script
+rem will also have no effect on Tomcat when launched as a Windows Service.
+rem The configuration that controls Windows Services is stored in the Windows
+rem Registry, and is most conveniently maintained using the "tomcatXw.exe"
+rem maintenance utility, where "X" is the major version of Tomcat you are
+rem running.
+rem
rem CATALINA_HOME May point at your Catalina "build" directory.
rem
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
@@ -57,6 +67,7 @@
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 Note that Java 9 no longer supports this feature.
rem Defaults to $CATALINA_HOME/endorsed.
rem
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
@@ -185,12 +196,27 @@
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuliConfig
-set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"
if not "%LOGGING_MANAGER%" == "" goto noJuliManager
set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
:noJuliManager
-set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"
+
+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 Configure JAVA 9 specific start-up parameters
+set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.lang=ALL-UNNAMED"
+set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
rem ----- Execute The Requested Command ---------------------------------------
@@ -308,17 +334,17 @@
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
-%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
-%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
-%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
-%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:end
diff --git a/tomcat-7/bin/catalina.sh b/tomcat-7/bin/catalina.sh
index 33a4803..fa39688 100755
--- a/tomcat-7/bin/catalina.sh
+++ b/tomcat-7/bin/catalina.sh
@@ -62,6 +62,7 @@
# 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.
+# Note that Java 9 no longer supports this feature.
# Defaults to $CATALINA_HOME/endorsed.
#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
@@ -245,6 +246,18 @@
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
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
+
# Uncomment the following line to make the umask available when using the
# org.apache.catalina.security.SecurityListener
#JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
@@ -261,6 +274,11 @@
_NOHUP=nohup
fi
+# Add the JAVA 9 specific start-up parameters required by Tomcat
+JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
+JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
+export JDK_JAVA_OPTIONS
+
# ----- Execute The Requested Command -----------------------------------------
# Bugzilla 37848: only output this if we have a TTY
@@ -308,7 +326,8 @@
fi
shift
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
+ -classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
@@ -318,7 +337,8 @@
org.apache.catalina.startup.Bootstrap "$@" start
else
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
+ -classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
@@ -336,7 +356,8 @@
fi
shift
eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
@@ -345,7 +366,8 @@
org.apache.catalina.startup.Bootstrap "$@" start
else
eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -402,7 +424,8 @@
fi
shift
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
@@ -413,7 +436,8 @@
else
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -465,7 +489,8 @@
fi
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
- -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -551,7 +576,8 @@
elif [ "$1" = "configtest" ] ; then
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
- -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+ -classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
diff --git a/tomcat-7/bin/commons-daemon-native.tar.gz b/tomcat-7/bin/commons-daemon-native.tar.gz
index 6d25918..39cfff5 100644
--- a/tomcat-7/bin/commons-daemon-native.tar.gz
+++ b/tomcat-7/bin/commons-daemon-native.tar.gz
Binary files differ
diff --git a/tomcat-7/bin/commons-daemon.jar b/tomcat-7/bin/commons-daemon.jar
index 2b6b9c6..173f67f 100644
--- a/tomcat-7/bin/commons-daemon.jar
+++ b/tomcat-7/bin/commons-daemon.jar
Binary files differ
diff --git a/tomcat-7/bin/daemon.sh b/tomcat-7/bin/daemon.sh
index dee6c77..ef9f708 100755
--- a/tomcat-7/bin/daemon.sh
+++ b/tomcat-7/bin/daemon.sh
@@ -94,6 +94,15 @@
#
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
@@ -172,6 +181,18 @@
fi
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
+
# ----- Execute The Requested Command -----------------------------------------
case "$1" in
run )
@@ -186,7 +207,7 @@
-errfile "&2" \
-classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \
@@ -203,7 +224,7 @@
-errfile "&1" \
-classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
- -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \
@@ -215,7 +236,7 @@
-stop \
-pidfile "$CATALINA_PID" \
-classpath "$CLASSPATH" \
- -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \
diff --git a/tomcat-7/bin/setclasspath.bat b/tomcat-7/bin/setclasspath.bat
index da0d8a3..2cf4610 100644
--- a/tomcat-7/bin/setclasspath.bat
+++ b/tomcat-7/bin/setclasspath.bat
@@ -67,7 +67,10 @@
:okJava
rem Don't override the endorsed dir if the user has set it previously
if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir
-rem Set the default -Djava.endorsed.dirs argument
+rem Java 9 no longer supports the java.endorsed.dirs
+rem system property. Only try to use it if
+rem CATALINA_HOME/endorsed exists.
+if not exist "%CATALINA_HOME%\endorsed" goto gotEndorseddir
set "JAVA_ENDORSED_DIRS=%CATALINA_HOME%\endorsed"
:gotEndorseddir
diff --git a/tomcat-7/bin/setclasspath.sh b/tomcat-7/bin/setclasspath.sh
index 873fad3..5232b8e 100755
--- a/tomcat-7/bin/setclasspath.sh
+++ b/tomcat-7/bin/setclasspath.sh
@@ -79,8 +79,12 @@
# Don't override the endorsed dir if the user has set it previously
if [ -z "$JAVA_ENDORSED_DIRS" ]; then
- # Set the default -Djava.endorsed.dirs argument
- JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
+ # Java 9 no longer supports the java.endorsed.dirs
+ # system property. Only try to use it if
+ # CATALINA_HOME/endorsed exists.
+ if [ -d "$CATALINA_HOME"/endorsed ]; then
+ JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
+ fi
fi
# Set standard commands for invoking Java, if not already set.
@@ -91,4 +95,4 @@
if [ -z "$_RUNJDB" ]; then
_RUNJDB="$JAVA_HOME"/bin/jdb
fi
-fi
\ No newline at end of file
+fi
diff --git a/tomcat-7/bin/tomcat-juli.jar b/tomcat-7/bin/tomcat-juli.jar
index 2d3628a..995d3e5 100644
--- a/tomcat-7/bin/tomcat-juli.jar
+++ b/tomcat-7/bin/tomcat-juli.jar
Binary files differ
diff --git a/tomcat-7/bin/tomcat-native.tar.gz b/tomcat-7/bin/tomcat-native.tar.gz
index 3d0d017..2b47ef1 100644
--- a/tomcat-7/bin/tomcat-native.tar.gz
+++ b/tomcat-7/bin/tomcat-native.tar.gz
Binary files differ
diff --git a/tomcat-7/bin/tool-wrapper.bat b/tomcat-7/bin/tool-wrapper.bat
index fcff6da..331d42e 100644
--- a/tomcat-7/bin/tool-wrapper.bat
+++ b/tomcat-7/bin/tool-wrapper.bat
@@ -36,6 +36,7 @@
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 Note that Java 9 no longer supports this feature.
rem Defaults to $CATALINA_HOME/endorsed.
rem ---------------------------------------------------------------------------
@@ -82,6 +83,19 @@
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
@@ -91,6 +105,6 @@
goto setArgs
:doneSetArgs
-%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
+%_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/tomcat-7/bin/tool-wrapper.sh b/tomcat-7/bin/tool-wrapper.sh
index 31cebf6..54ea0fc 100755
--- a/tomcat-7/bin/tool-wrapper.sh
+++ b/tomcat-7/bin/tool-wrapper.sh
@@ -37,6 +37,7 @@
# 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.
+# Note that Java 9 no longer supports this feature.
# Defaults to $CATALINA_HOME/endorsed.
# -----------------------------------------------------------------------------
@@ -129,11 +130,24 @@
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 -----------------------------------------
exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
- -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
+ -classpath "$CLASSPATH" \
-Dcatalina.home="$CATALINA_HOME" \
org.apache.catalina.startup.Tool "$@"
diff --git a/tomcat-7/conf/catalina.policy b/tomcat-7/conf/catalina.policy
index 354d7d6..9a33883 100644
--- a/tomcat-7/conf/catalina.policy
+++ b/tomcat-7/conf/catalina.policy
@@ -72,7 +72,7 @@
permission java.io.FilePermission
"${catalina.base}${file.separator}logs", "read, write";
permission java.io.FilePermission
- "${catalina.base}${file.separator}logs${file.separator}*", "read, write";
+ "${catalina.base}${file.separator}logs${file.separator}*", "read, write, delete";
permission java.lang.RuntimePermission "shutdownHooks";
permission java.lang.RuntimePermission "getClassLoader";
@@ -194,8 +194,9 @@
// The Manager application needs access to the following packages to support the
-// session display functionality. These settings support the following
-// configurations:
+// session display functionality. It also requires the custom Tomcat
+// DeployXmlPermission to enable the use of META-INF/context.xml
+// These settings support the following configurations:
// - default CATALINA_HOME == CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
@@ -205,6 +206,7 @@
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
+ permission org.apache.catalina.security.DeployXmlPermission "manager";
};
grant codeBase "file:${catalina.home}/webapps/manager/-" {
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
@@ -212,8 +214,23 @@
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
+ permission org.apache.catalina.security.DeployXmlPermission "manager";
};
+// The Host Manager application needs the custom Tomcat DeployXmlPermission to
+// enable the use of META-INF/context.xml
+// These settings support the following configurations:
+// - default CATALINA_HOME == CATALINA_BASE
+// - CATALINA_HOME != CATALINA_BASE, per instance Host Manager in CATALINA_BASE
+// - CATALINA_HOME != CATALINA_BASE, shared Host Manager in CATALINA_HOME
+grant codeBase "file:${catalina.base}/webapps/host-manager/-" {
+ permission org.apache.catalina.security.DeployXmlPermission "host-manager";
+};
+grant codeBase "file:${catalina.home}/webapps/host-manager/-" {
+ permission org.apache.catalina.security.DeployXmlPermission "host-manager";
+};
+
+
// You can assign additional permissions to particular web applications by
// adding additional "grant" entries here, based on the code base for that
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
diff --git a/tomcat-7/conf/catalina.properties b/tomcat-7/conf/catalina.properties
index cb4e5d5..f231698 100644
--- a/tomcat-7/conf/catalina.properties
+++ b/tomcat-7/conf/catalina.properties
@@ -131,3 +131,7 @@
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000
+
+# Allow for changes to HTTP request validation
+# WARNING: Using this option will expose the server to CVE-2016-6816
+#tomcat.util.http.parser.HttpParser.requestTargetAllow=|
diff --git a/tomcat-7/conf/web.xml b/tomcat-7/conf/web.xml
index 91c8875..9816f30 100644
--- a/tomcat-7/conf/web.xml
+++ b/tomcat-7/conf/web.xml
@@ -232,8 +232,8 @@
<!-- suppressSmap Should the generation of SMAP info for JSR45 -->
<!-- debugging be suppressed? [false] -->
<!-- -->
- <!-- trimSpaces Should white spaces in template text between -->
- <!-- actions or directives be trimmed? [false] -->
+ <!-- trimSpaces Should template text that consists entirely of -->
+ <!-- whitespace be removed from the output? [false] -->
<!-- -->
<!-- xpoweredBy Determines whether X-Powered-By response -->
<!-- header is added by generated servlet. [false] -->
@@ -330,6 +330,11 @@
<!-- If not set, then webAppRootDir is used. -->
<!-- Recommended value: WEB-INF/cgi -->
<!-- -->
+ <!-- enableCmdLineArguments -->
+ <!-- Are command line parameters generated from -->
+ <!-- the query string as per section 4.4 of 3875 -->
+ <!-- RFC? [true] -->
+ <!-- -->
<!-- executable Name of the executable used to run the -->
<!-- script. [perl] -->
<!-- -->
@@ -342,6 +347,15 @@
<!-- [ACCEPT[-0-9A-Z]*|CACHE-CONTROL|COOKIE|HOST| -->
<!-- IF-[-0-9A-Z]*|REFERER|USER-AGENT] -->
<!-- -->
+ <!-- environment-variable- An environment to be set for the execution -->
+ <!-- environment of the CGI script. The name of -->
+ <!-- variable is taken from the parameter name. -->
+ <!-- To configure an environment variable named -->
+ <!-- FOO, configure a parameter named -->
+ <!-- environment-variable-FOO. The parameter value -->
+ <!-- is used as the environment variable value. -->
+ <!-- The default is no environment variables. -->
+ <!-- -->
<!-- parameterEncoding Name of parameter encoding to be used with -->
<!-- CGI servlet. -->
<!-- [System.getProperty("file.encoding","UTF-8")] -->
@@ -2869,7 +2883,7 @@
</mime-mapping>
<mime-mapping>
<extension>otf</extension>
- <mime-type>application/x-font-otf</mime-type>
+ <mime-type>font/otf</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Drawing Template -->
@@ -3908,11 +3922,11 @@
</mime-mapping>
<mime-mapping>
<extension>ttc</extension>
- <mime-type>application/x-font-ttf</mime-type>
+ <mime-type>font/collection</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttf</extension>
- <mime-type>application/x-font-ttf</mime-type>
+ <mime-type>font/ttf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttl</extension>
@@ -4301,7 +4315,11 @@
</mime-mapping>
<mime-mapping>
<extension>woff</extension>
- <mime-type>application/x-font-woff</mime-type>
+ <mime-type>font/woff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>woff2</extension>
+ <mime-type>font/woff2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wpd</extension>
diff --git a/tomcat-7/lib/annotations-api.jar b/tomcat-7/lib/annotations-api.jar
index b2992ee..bc66f56 100644
--- a/tomcat-7/lib/annotations-api.jar
+++ b/tomcat-7/lib/annotations-api.jar
Binary files differ
diff --git a/tomcat-7/lib/catalina-ant.jar b/tomcat-7/lib/catalina-ant.jar
index fe7cc4c..7b38eb7 100644
--- a/tomcat-7/lib/catalina-ant.jar
+++ b/tomcat-7/lib/catalina-ant.jar
Binary files differ
diff --git a/tomcat-7/lib/catalina-ha.jar b/tomcat-7/lib/catalina-ha.jar
index 13b93ae..c4ce643 100644
--- a/tomcat-7/lib/catalina-ha.jar
+++ b/tomcat-7/lib/catalina-ha.jar
Binary files differ
diff --git a/tomcat-7/lib/catalina-tribes.jar b/tomcat-7/lib/catalina-tribes.jar
index f30dfd1..4ef795e 100644
--- a/tomcat-7/lib/catalina-tribes.jar
+++ b/tomcat-7/lib/catalina-tribes.jar
Binary files differ
diff --git a/tomcat-7/lib/catalina.jar b/tomcat-7/lib/catalina.jar
index 2a0610f..3863c0f 100644
--- a/tomcat-7/lib/catalina.jar
+++ b/tomcat-7/lib/catalina.jar
Binary files differ
diff --git a/tomcat-7/lib/el-api.jar b/tomcat-7/lib/el-api.jar
index 1e7c24d..032c731 100644
--- a/tomcat-7/lib/el-api.jar
+++ b/tomcat-7/lib/el-api.jar
Binary files differ
diff --git a/tomcat-7/lib/jasper-el.jar b/tomcat-7/lib/jasper-el.jar
index 0f037db..646d286 100644
--- a/tomcat-7/lib/jasper-el.jar
+++ b/tomcat-7/lib/jasper-el.jar
Binary files differ
diff --git a/tomcat-7/lib/jasper.jar b/tomcat-7/lib/jasper.jar
index 8296104..2f1cc09 100644
--- a/tomcat-7/lib/jasper.jar
+++ b/tomcat-7/lib/jasper.jar
Binary files differ
diff --git a/tomcat-7/lib/jsp-api.jar b/tomcat-7/lib/jsp-api.jar
index 4be33e6..834409a 100644
--- a/tomcat-7/lib/jsp-api.jar
+++ b/tomcat-7/lib/jsp-api.jar
Binary files differ
diff --git a/tomcat-7/lib/servlet-api.jar b/tomcat-7/lib/servlet-api.jar
index 2b70c7f..e48e837 100644
--- a/tomcat-7/lib/servlet-api.jar
+++ b/tomcat-7/lib/servlet-api.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-api.jar b/tomcat-7/lib/tomcat-api.jar
index a016367..8101035 100644
--- a/tomcat-7/lib/tomcat-api.jar
+++ b/tomcat-7/lib/tomcat-api.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-coyote.jar b/tomcat-7/lib/tomcat-coyote.jar
index fb6c0b8..d2dba72 100644
--- a/tomcat-7/lib/tomcat-coyote.jar
+++ b/tomcat-7/lib/tomcat-coyote.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-dbcp.jar b/tomcat-7/lib/tomcat-dbcp.jar
index 1cea288..e69dc88 100644
--- a/tomcat-7/lib/tomcat-dbcp.jar
+++ b/tomcat-7/lib/tomcat-dbcp.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-i18n-es.jar b/tomcat-7/lib/tomcat-i18n-es.jar
index 8101fdb..62cd0c9 100644
--- a/tomcat-7/lib/tomcat-i18n-es.jar
+++ b/tomcat-7/lib/tomcat-i18n-es.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-i18n-fr.jar b/tomcat-7/lib/tomcat-i18n-fr.jar
index 8da2f03..458c3e1 100644
--- a/tomcat-7/lib/tomcat-i18n-fr.jar
+++ b/tomcat-7/lib/tomcat-i18n-fr.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-i18n-ja.jar b/tomcat-7/lib/tomcat-i18n-ja.jar
index 93d4ccd..da6f279 100644
--- a/tomcat-7/lib/tomcat-i18n-ja.jar
+++ b/tomcat-7/lib/tomcat-i18n-ja.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-jdbc.jar b/tomcat-7/lib/tomcat-jdbc.jar
index 6d8bc5b..ed50062 100644
--- a/tomcat-7/lib/tomcat-jdbc.jar
+++ b/tomcat-7/lib/tomcat-jdbc.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat-util.jar b/tomcat-7/lib/tomcat-util.jar
index 955077c..d6e107b 100644
--- a/tomcat-7/lib/tomcat-util.jar
+++ b/tomcat-7/lib/tomcat-util.jar
Binary files differ
diff --git a/tomcat-7/lib/tomcat7-websocket.jar b/tomcat-7/lib/tomcat7-websocket.jar
index 3195021..2dd14d2 100644
--- a/tomcat-7/lib/tomcat7-websocket.jar
+++ b/tomcat-7/lib/tomcat7-websocket.jar
Binary files differ
diff --git a/tomcat-7/lib/websocket-api.jar b/tomcat-7/lib/websocket-api.jar
index 1078555..154d8bf 100644
--- a/tomcat-7/lib/websocket-api.jar
+++ b/tomcat-7/lib/websocket-api.jar
Binary files differ