Skip to content

Instantly share code, notes, and snippets.

@wangshizhan
Created April 16, 2020 06:27
Show Gist options
  • Save wangshizhan/bae7d0f0f620f7c6b9d24c1d38d4ecad to your computer and use it in GitHub Desktop.
Save wangshizhan/bae7d0f0f620f7c6b9d24c1d38d4ecad to your computer and use it in GitHub Desktop.
This gist exceeds the recommended number of files (~10). To access all files, please clone this gist.
# -----------------------------------------------------------------------------
# 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.
# -----------------------------------------------------------------------------
logs
nbproject
output
# Next line commented out, because test/webapp-virtual-library and
# test/webapp-virtual-webapp use it:
# target
work
build.properties
mvn.properties
.ant-targets-build.xml
.checkstyle
.classpath
.fbprefs
.project
.settings
.idea
*.iml
*.ipr
*.iws
*.asc
*.jj
*.tmp
maven-ant-tasks-*.jar
thumbs.db
Thumbs.db
bin/setenv.*
java/org/apache/catalina/startup/catalina.properties
modules/jdbc-pool/bin
modules/jdbc-pool/includes
webapps/docs/jdbc-pool.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="MavenSettings" />
</component>
</project>
# 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.
dist: bionic
language: java
jdk: oraclejdk8
arch: arm64
addons:
apt:
packages:
- ant
- build-essential
- automake
- autoconf
- tar
- libssl-dev
- subversion
- git
- libtool-bin
install:
- ARCH=`uname -p`
- echo $ARCH
- JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz"
- JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz"
- if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; else JDK_URL=$JDK_X64; fi
- wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz
- mv jdk8* jdk
- export JAVA_HOME=`pwd`/jdk
- wget -q http://mirrors.netix.net/apache/ant/binaries/apache-ant-1.10.7-bin.tar.gz && tar xzf apache-ant-*-bin.tar.gz
- export ANT_HOME=`pwd`/apache-ant-1.10.7
- export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
- java -version
- ant -version
- rm -rf $HOME/tmp
- export CURR_PWD=`pwd`
- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ $HOME/tmp/apr
- cd $HOME/tmp/apr
- ./buildconf
- ./configure --prefix=$HOME/tmp/apr-build
- make
- make install
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/tmp/apr-build/lib"
- git clone -q https://github.com/apache/tomcat-native.git $HOME/tmp/tomcat-native
- cd $HOME/tmp/tomcat-native/native
- sh buildconf --with-apr=$HOME/tmp/apr
- ./configure --with-apr=$HOME/tmp/apr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$HOME/tmp/tomcat-native-build
- make
- make install
- cd $CURR_PWD
- yes | cp build.properties.default build.properties
- echo >> build.properties
- echo "test.threads=16" >> build.properties
- echo "test.relaxTiming=true" >> build.properties
- echo "test.excludePerformance=true" >> build.properties
- echo "test.openssl.path=/dev/null/openssl" >> build.properties
- echo "test.apr.loc=$HOME/tmp/tomcat-native-build/lib" >> build.properties
script:
- ant -q clean
- travis_wait 60 "./.travis/antTest.sh"
after_failure:
- tail -n 5000 ant-test.log
- ls -laR $HOME/tomcat-build-libs
notifications:
email:
- [email protected]
#!/usr/bin/env bash
# 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.
# A helper script for TravisCI builds that saves the std
# out and err streams in a log file. This is needed
# because otherwise TravisCI complains that there is too
# much logging on stdout
ant -q test 2>&1 > ant-test.log
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!--
XML file for importing Catalina ant tasks.
<import file="${catalina.home}/bin/catalina-tasks.xml"/>
-->
<project name="catalina-tasks">
<description>Catalina Ant Manager, JMX and JSPC Tasks</description>
<!-- set catalina.home if it's not already set -->
<dirname property="catalina.home.bin.dir" file="${ant.file.catalina-tasks}"/>
<property name="catalina.home" value="${catalina.home.bin.dir}/.."/>
<typedef resource="org/apache/catalina/ant/catalina.tasks">
<classpath>
<fileset file="${catalina.home}/bin/tomcat-juli.jar"/>
<fileset dir="${catalina.home}/lib" includes="*.jar"/>
</classpath>
</typedef>
<typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">
<classpath>
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
</classpath>
</typedef>
</project>
@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 Start/Stop Script for the CATALINA Server
rem
rem For supported commands call "catalina.bat help" or see the usage section
rem towards the end of this file.
rem
rem Environment Variable Prerequisites
rem
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 "tomcat@[email protected]"
rem maintenance utility.
rem
rem CATALINA_HOME May point at your Catalina "build" directory.
rem
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
rem of a Catalina installation. If not present, resolves to
rem the same directory that CATALINA_HOME points to.
rem
rem CATALINA_OPTS (Optional) Java runtime options used when the "start",
rem "run" or "debug" command is executed.
rem Include here and not in JAVA_OPTS all options, that should
rem only be used by Tomcat itself, not by the stop process,
rem the version command etc.
rem Examples are heap size, GC logging, JMX ports etc.
rem
rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory
rem the JVM should use (java.io.tmpdir). Defaults to
rem %CATALINA_BASE%\temp.
rem
rem JAVA_HOME Must point at your Java Development Kit installation.
rem Required to run the with the "debug" argument.
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 used when any command
rem is executed.
rem Include here and not in CATALINA_OPTS all options, that
rem should be used by Tomcat and also by the stop process,
rem the version command etc.
rem Most options should go into CATALINA_OPTS.
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
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
rem command is executed. The default is "dt_socket".
rem
rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
rem command is executed. The default is localhost:8000.
rem
rem JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
rem command is executed. Specifies whether JVM should suspend
rem execution immediately after startup. Default is "n".
rem
rem JPDA_OPTS (Optional) Java runtime options used when the "jpda start"
rem command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS,
rem and JPDA_SUSPEND are ignored. Thus, all required jpda
rem options MUST be specified. The default is:
rem
rem -agentlib:jdwp=transport=%JPDA_TRANSPORT%,
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
rem
rem JSSE_OPTS (Optional) Java runtime options used to control the TLS
rem implementation when JSSE is used. Default is:
rem "-Djdk.tls.ephemeralDHKeySize=2048"
rem
rem CATALINA_LOGGING_CONFIG (Optional) Override Tomcat's logging config file
rem Example (all one line)
rem set CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
rem
rem LOGGING_MANAGER (Optional) Override Tomcat's logging manager
rem Example (all one line)
rem set LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
rem
rem TITLE (Optional) Specify the title of Tomcat window. The default
rem TITLE is Tomcat if it's not specified.
rem Example (all one line)
rem set TITLE=Tomcat.Cluster#1.Server#1 [%DATE% %TIME%]
rem ---------------------------------------------------------------------------
setlocal
rem Suppress Terminate batch job on CTRL+C
if not ""%1"" == ""run"" goto mainEntry
if "%TEMP%" == "" goto mainEntry
if exist "%TEMP%\%~nx0.run" goto mainEntry
echo Y>"%TEMP%\%~nx0.run"
if not exist "%TEMP%\%~nx0.run" goto mainEntry
echo Y>"%TEMP%\%~nx0.Y"
call "%~f0" %* <"%TEMP%\%~nx0.Y"
rem Use provided errorlevel
set RETVAL=%ERRORLEVEL%
del /Q "%TEMP%\%~nx0.Y" >NUL 2>&1
exit /B %RETVAL%
:mainEntry
del /Q "%TEMP%\%~nx0.run" >NUL 2>&1
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
rem Copy CATALINA_BASE from CATALINA_HOME if not defined
if not "%CATALINA_BASE%" == "" goto gotBase
set "CATALINA_BASE=%CATALINA_HOME%"
:gotBase
rem Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a semi-colon
rem as this is used as the separator in the classpath and Java provides no
rem mechanism for escaping if the same character appears in the path. Check this
rem by replacing all occurrences of ';' with '' and checking that neither
rem CATALINA_HOME nor CATALINA_BASE have changed
if "%CATALINA_HOME%" == "%CATALINA_HOME:;=%" goto homeNoSemicolon
echo Using CATALINA_HOME: "%CATALINA_HOME%"
echo Unable to start as CATALINA_HOME contains a semicolon (;) character
goto end
:homeNoSemicolon
if "%CATALINA_BASE%" == "%CATALINA_BASE:;=%" goto baseNoSemicolon
echo Using CATALINA_BASE: "%CATALINA_BASE%"
echo Unable to start as CATALINA_BASE contains a semicolon (;) character
goto end
:baseNoSemicolon
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 not exist "%CATALINA_BASE%\bin\setenv.bat" goto checkSetenvHome
call "%CATALINA_BASE%\bin\setenv.bat"
goto setenvDone
:checkSetenvHome
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
:setenvDone
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 file 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"
if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
set "CATALINA_TMPDIR=%CATALINA_BASE%\temp"
:gotTmpdir
rem Add tomcat-juli.jar to classpath
rem tomcat-juli.jar can be over-ridden per instance
if not exist "%CATALINA_BASE%\bin\tomcat-juli.jar" goto juliClasspathHome
set "CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar"
goto juliClasspathDone
:juliClasspathHome
set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
:juliClasspathDone
if not "%JSSE_OPTS%" == "" goto gotJsseOpts
set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048"
:gotJsseOpts
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
rem Register custom URL handlers
rem Do this here so custom URL handles (specifically 'war:...') can be used in the security policy
set "JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
if not "%CATALINA_LOGGING_CONFIG%" == "" goto noJuliConfig
set CATALINA_LOGGING_CONFIG=-Dnop
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
set CATALINA_LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuliConfig
if not "%LOGGING_MANAGER%" == "" goto noJuliManager
set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
:noJuliManager
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.base/java.io=ALL-UNNAMED"
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
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 ----- Execute The Requested Command ---------------------------------------
echo Using CATALINA_BASE: "%CATALINA_BASE%"
echo Using CATALINA_HOME: "%CATALINA_HOME%"
echo Using CATALINA_TMPDIR: "%CATALINA_TMPDIR%"
if ""%1"" == ""debug"" goto use_jdk
echo Using JRE_HOME: "%JRE_HOME%"
goto java_dir_displayed
:use_jdk
echo Using JAVA_HOME: "%JAVA_HOME%"
:java_dir_displayed
echo Using CLASSPATH: "%CLASSPATH%"
set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=
if not ""%1"" == ""jpda"" goto noJpda
set JPDA=jpda
if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
set JPDA_TRANSPORT=dt_socket
:gotJpdaTransport
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
set JPDA_ADDRESS=localhost:8000
:gotJpdaAddress
if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
set JPDA_SUSPEND=n
:gotJpdaSuspend
if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
set JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
:gotJpdaOpts
shift
:noJpda
if ""%1"" == ""debug"" goto doDebug
if ""%1"" == ""run"" goto doRun
if ""%1"" == ""start"" goto doStart
if ""%1"" == ""stop"" goto doStop
if ""%1"" == ""configtest"" goto doConfigTest
if ""%1"" == ""version"" goto doVersion
echo Usage: catalina ( commands ... )
echo commands:
echo debug Start Catalina in a debugger
echo debug -security Debug Catalina with a security manager
echo jpda start Start Catalina under JPDA debugger
echo run Start Catalina in the current window
echo run -security Start in the current window with security manager
echo start Start Catalina in a separate window
echo start -security Start in a separate window with security manager
echo stop Stop Catalina
echo configtest Run a basic syntax check on server.xml
echo version What version of tomcat are you running?
goto end
:doDebug
shift
set _EXECJAVA=%_RUNJDB%
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
goto execCmd
:doRun
shift
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
goto execCmd
:doStart
shift
if "%TITLE%" == "" set TITLE=Tomcat
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
goto execCmd
:doStop
shift
set ACTION=stop
set CATALINA_OPTS=
goto execCmd
:doConfigTest
shift
set ACTION=configtest
set CATALINA_OPTS=
goto execCmd
:doVersion
%_EXECJAVA% -classpath "%CATALINA_HOME%\lib\catalina.jar" org.apache.catalina.util.ServerInfo
goto end
:execCmd
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
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %CATALINA_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% %CATALINA_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% %CATALINA_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% %CATALINA_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
#!/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.
# -----------------------------------------------------------------------------
# Control Script for the CATALINA Server
#
# For supported commands call "catalina.sh help" or see the usage section at
# the end of this file.
#
# Environment Variable Prerequisites
#
# Do not set the variables in this script. Instead put them into a script
# setenv.sh in CATALINA_BASE/bin to keep your customizations separate.
#
# CATALINA_HOME May point at your Catalina "build" directory.
#
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions
# of a Catalina installation. If not present, resolves to
# the same directory that CATALINA_HOME points to.
#
# CATALINA_OUT (Optional) Full path to a file where stdout and stderr
# will be redirected.
# Default is $CATALINA_BASE/logs/catalina.out
#
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
# "run" or "debug" command is executed.
# Include here and not in JAVA_OPTS all options, that should
# only be used by Tomcat itself, not by the stop process,
# the version command etc.
# Examples are heap size, GC logging, JMX ports etc.
#
# CATALINA_TMPDIR (Optional) Directory path location of temporary directory
# the JVM should use (java.io.tmpdir). Defaults to
# $CATALINA_BASE/temp.
#
# JAVA_HOME Must point at your Java Development Kit installation.
# Required to run the with the "debug" argument.
#
# 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 used when any command
# is executed.
# Include here and not in CATALINA_OPTS all options, that
# should be used by Tomcat and also by the stop process,
# the version command etc.
# Most options should go into CATALINA_OPTS.
#
# 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.
#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
# command is executed. The default is "dt_socket".
#
# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
# command is executed. The default is localhost:8000.
#
# JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
# command is executed. Specifies whether JVM should suspend
# execution immediately after startup. Default is "n".
#
# JPDA_OPTS (Optional) Java runtime options used when the "jpda start"
# command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS,
# and JPDA_SUSPEND are ignored. Thus, all required jpda
# options MUST be specified. The default is:
#
# -agentlib:jdwp=transport=$JPDA_TRANSPORT,
# address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND
#
# JSSE_OPTS (Optional) Java runtime options used to control the TLS
# implementation when JSSE is used. Default is:
# "-Djdk.tls.ephemeralDHKeySize=2048"
#
# CATALINA_PID (Optional) Path of the file which should contains the pid
# of the catalina startup java process, when start (fork) is
# used
#
# CATALINA_LOGGING_CONFIG (Optional) Override Tomcat's logging config file
# Example (all one line)
# CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
#
# LOGGING_MANAGER (Optional) Override Tomcat's logging manager
# Example (all one line)
# LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
#
# UMASK (Optional) Override Tomcat's default UMASK of 0027
#
# USE_NOHUP (Optional) If set to the string true the start command will
# use nohup so that the Tomcat process will ignore any hangup
# signals. Default is "false" unless running on HP-UX in which
# case the default is "true"
# -----------------------------------------------------------------------------
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
darwin=false
os400=false
hpux=false
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin*) darwin=true;;
OS400*) os400=true;;
HP-UX*) hpux=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`
# Copy CATALINA_BASE from CATALINA_HOME if not already set
[ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME"
# 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_BASE/bin/setenv.sh" ]; then
. "$CATALINA_BASE/bin/setenv.sh"
elif [ -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 "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon
# as this is used as the separator in the classpath and Java provides no
# mechanism for escaping if the same character appears in the path.
case $CATALINA_HOME in
*:*) echo "Using CATALINA_HOME: $CATALINA_HOME";
echo "Unable to start as CATALINA_HOME contains a colon (:) character";
exit 1;
esac
case $CATALINA_BASE in
*:*) echo "Using CATALINA_BASE: $CATALINA_BASE";
echo "Unable to start as CATALINA_BASE contains a colon (:) character";
exit 1;
esac
# 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
if [ -z "$CATALINA_OUT" ] ; then
CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
fi
if [ -z "$CATALINA_TMPDIR" ] ; then
# Define the java.io.tmpdir to use for Catalina
CATALINA_TMPDIR="$CATALINA_BASE"/temp
fi
# 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
# Bugzilla 37848: When no TTY is available, don't output to console
have_tty=0
if [ -t 0 ]; then
have_tty=1
fi
# 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"`
CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$JAVA_ENDORSED_DIRS" ] && JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
fi
if [ -z "$JSSE_OPTS" ] ; then
JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
fi
JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS"
# Register custom URL handlers
# Do this here so custom URL handles (specifically 'war:...') can be used in the security policy
JAVA_OPTS="$JAVA_OPTS -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
# 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
if [ -z "$LOGGING_MANAGER" ]; then
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
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
# Make the umask available when using the org.apache.catalina.security.SecurityListener
JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
if [ -z "$USE_NOHUP" ]; then
if $hpux; then
USE_NOHUP="true"
else
USE_NOHUP="false"
fi
fi
unset _NOHUP
if [ "$USE_NOHUP" = "true" ]; then
_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.base/java.io=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
if [ $have_tty -eq 1 ]; then
echo "Using CATALINA_BASE: $CATALINA_BASE"
echo "Using CATALINA_HOME: $CATALINA_HOME"
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
if [ "$1" = "debug" ] ; then
echo "Using JAVA_HOME: $JAVA_HOME"
else
echo "Using JRE_HOME: $JRE_HOME"
fi
echo "Using CLASSPATH: $CLASSPATH"
if [ ! -z "$CATALINA_PID" ]; then
echo "Using CATALINA_PID: $CATALINA_PID"
fi
fi
if [ "$1" = "jpda" ] ; then
if [ -z "$JPDA_TRANSPORT" ]; then
JPDA_TRANSPORT="dt_socket"
fi
if [ -z "$JPDA_ADDRESS" ]; then
JPDA_ADDRESS="localhost:8000"
fi
if [ -z "$JPDA_SUSPEND" ]; then
JPDA_SUSPEND="n"
fi
if [ -z "$JPDA_OPTS" ]; then
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
fi
CATALINA_OPTS="$JPDA_OPTS $CATALINA_OPTS"
shift
fi
# TODO: Bugzilla 63815
# This doesn't currently work (and can't be made to work) if values used in
# CATALINA_OPTS and/or JAVA_OPTS require quoting. See:
# https://bugs.openjdk.java.net/browse/JDK-8234808
if [ "$1" = "debug" ] ; then
if $os400; then
echo "Debug command not available on OS400"
exit 1
else
shift
if [ "$1" = "-security" ] ; then
if [ $have_tty -eq 1 ]; then
echo "Using Security Manager"
fi
shift
exec "$_RUNJDB" "$CATALINA_LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
org.apache.catalina.startup.Bootstrap "$@" start
else
exec "$_RUNJDB" "$CATALINA_LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
org.apache.catalina.startup.Bootstrap "$@" start
fi
fi
elif [ "$1" = "run" ]; then
shift
if [ "$1" = "-security" ] ; then
if [ $have_tty -eq 1 ]; then
echo "Using Security Manager"
fi
shift
eval exec "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap "$@" start
else
eval exec "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap "$@" start
fi
elif [ "$1" = "start" ] ; then
if [ ! -z "$CATALINA_PID" ]; then
if [ -f "$CATALINA_PID" ]; then
if [ -s "$CATALINA_PID" ]; then
echo "Existing PID file found during start."
if [ -r "$CATALINA_PID" ]; then
PID=`cat "$CATALINA_PID"`
ps -p $PID >/dev/null 2>&1
if [ $? -eq 0 ] ; then
echo "Tomcat appears to still be running with PID $PID. Start aborted."
echo "If the following process is not a Tomcat process, remove the PID file and try again:"
ps -f -p $PID
exit 1
else
echo "Removing/clearing stale PID file."
rm -f "$CATALINA_PID" >/dev/null 2>&1
if [ $? != 0 ]; then
if [ -w "$CATALINA_PID" ]; then
cat /dev/null > "$CATALINA_PID"
else
echo "Unable to remove or clear stale PID file. Start aborted."
exit 1
fi
fi
fi
else
echo "Unable to read PID file. Start aborted."
exit 1
fi
else
rm -f "$CATALINA_PID" >/dev/null 2>&1
if [ $? != 0 ]; then
if [ ! -w "$CATALINA_PID" ]; then
echo "Unable to remove or write to empty PID file. Start aborted."
exit 1
fi
fi
fi
fi
fi
shift
touch "$CATALINA_OUT"
if [ "$1" = "-security" ] ; then
if [ $have_tty -eq 1 ]; then
echo "Using Security Manager"
fi
shift
eval $_NOHUP "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 "&"
else
eval $_NOHUP "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 "&"
fi
if [ ! -z "$CATALINA_PID" ]; then
echo $! > "$CATALINA_PID"
fi
echo "Tomcat started."
elif [ "$1" = "stop" ] ; then
shift
SLEEP=5
if [ ! -z "$1" ]; then
echo $1 | grep "[^0-9]" >/dev/null 2>&1
if [ $? -gt 0 ]; then
SLEEP=$1
shift
fi
fi
FORCE=0
if [ "$1" = "-force" ]; then
shift
FORCE=1
fi
if [ ! -z "$CATALINA_PID" ]; then
if [ -f "$CATALINA_PID" ]; then
if [ -s "$CATALINA_PID" ]; then
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
if [ $? -gt 0 ]; then
echo "PID file found but either no matching process was found or the current user does not have permission to stop the process. Stop aborted."
exit 1
fi
else
echo "PID file is empty and has been ignored."
fi
else
echo "\$CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted."
exit 1
fi
fi
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER "$JAVA_OPTS" \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap "$@" stop
# stop failed. Shutdown port disabled? Try a normal kill.
if [ $? != 0 ]; then
if [ ! -z "$CATALINA_PID" ]; then
echo "The stop command failed. Attempting to signal the process to stop through OS signal."
kill -15 `cat "$CATALINA_PID"` >/dev/null 2>&1
fi
fi
if [ ! -z "$CATALINA_PID" ]; then
if [ -f "$CATALINA_PID" ]; then
while [ $SLEEP -ge 0 ]; do
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
if [ $? -gt 0 ]; then
rm -f "$CATALINA_PID" >/dev/null 2>&1
if [ $? != 0 ]; then
if [ -w "$CATALINA_PID" ]; then
cat /dev/null > "$CATALINA_PID"
# If Tomcat has stopped don't try and force a stop with an empty PID file
FORCE=0
else
echo "The PID file could not be removed or cleared."
fi
fi
echo "Tomcat stopped."
break
fi
if [ $SLEEP -gt 0 ]; then
sleep 1
fi
if [ $SLEEP -eq 0 ]; then
echo "Tomcat did not stop in time."
if [ $FORCE -eq 0 ]; then
echo "PID file was not removed."
fi
echo "To aid diagnostics a thread dump has been written to standard out."
kill -3 `cat "$CATALINA_PID"`
fi
SLEEP=`expr $SLEEP - 1 `
done
fi
fi
KILL_SLEEP_INTERVAL=5
if [ $FORCE -eq 1 ]; then
if [ -z "$CATALINA_PID" ]; then
echo "Kill failed: \$CATALINA_PID not set"
else
if [ -f "$CATALINA_PID" ]; then
PID=`cat "$CATALINA_PID"`
echo "Killing Tomcat with the PID: $PID"
kill -9 $PID
while [ $KILL_SLEEP_INTERVAL -ge 0 ]; do
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
if [ $? -gt 0 ]; then
rm -f "$CATALINA_PID" >/dev/null 2>&1
if [ $? != 0 ]; then
if [ -w "$CATALINA_PID" ]; then
cat /dev/null > "$CATALINA_PID"
else
echo "The PID file could not be removed."
fi
fi
echo "The Tomcat process has been killed."
break
fi
if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then
sleep 1
fi
KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 `
done
if [ $KILL_SLEEP_INTERVAL -lt 0 ]; then
echo "Tomcat has not been killed completely yet. The process might be waiting on some system call or might be UNINTERRUPTIBLE."
fi
fi
fi
fi
elif [ "$1" = "configtest" ] ; then
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER "$JAVA_OPTS" \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap configtest
result=$?
if [ $result -ne 0 ]; then
echo "Configuration error detected!"
fi
exit $result
elif [ "$1" = "version" ] ; then
"$_RUNJAVA" \
-classpath "$CATALINA_HOME/lib/catalina.jar" \
org.apache.catalina.util.ServerInfo
else
echo "Usage: catalina.sh ( commands ... )"
echo "commands:"
if $os400; then
echo " debug Start Catalina in a debugger (not available on OS400)"
echo " debug -security Debug Catalina with a security manager (not available on OS400)"
else
echo " debug Start Catalina in a debugger"
echo " debug -security Debug Catalina with a security manager"
fi
echo " jpda start Start Catalina under JPDA debugger"
echo " run Start Catalina in the current window"
echo " run -security Start in the current window with security manager"
echo " start Start Catalina in a separate window"
echo " start -security Start in a separate window with security manager"
echo " stop Stop Catalina, waiting up to 5 seconds for the process to end"
echo " stop n Stop Catalina, waiting up to n seconds for the process to end"
echo " stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running"
echo " stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if still running"
echo " configtest Run a basic syntax check on server.xml - check exit code for result"
echo " version What version of tomcat are you running?"
echo "Note: Waiting for the process to end and use of the -force option require that \$CATALINA_PID is defined"
exit 1
fi
@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%" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser %CMD_LINE_ARGS%
:end
#!/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" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser "$@"
@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
#!/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 "$@"
#!/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
# 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
@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
#!/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 "$@"
@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 <path-to-target-directory> [-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 ^<path-to-target-directory^>
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
#!/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 <path-to-target-directory> [-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 <path-to-target-directory>"
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
@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 Tomcat@VERSION_MAJOR@ is used as the service name.
rem
rem --rename (optional) Rename tomcat@[email protected] and tomcat@[email protected] 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=Tomcat@VERSION_MAJOR@
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%"
goto end
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 okHome
if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" goto okHome
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.
goto end
:okHome
cd "%CURRENT_DIR%"
rem Make sure prerequisite environment variables are set
if not "%JAVA_HOME%" == "" goto gotJdkHome
if not "%JRE_HOME%" == "" goto gotJreHome
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
echo Service will try to guess them from the registry.
goto okJavaHome
:gotJreHome
if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:gotJdkHome
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
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 noJavaHome
if not "%JRE_HOME%" == "" goto okJavaHome
set "JRE_HOME=%JAVA_HOME%"
goto okJavaHome
:preJava9Layout
if not "%JRE_HOME%" == "" goto okJavaHome
set "JRE_HOME=%JAVA_HOME%\jre"
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
echo NB: JAVA_HOME should point to a JDK not a JRE
goto end
:okJavaHome
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]
goto end
: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
goto end
: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"
)
goto end
: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 @VERSION@ Server - https://tomcat.apache.org/" ^
--DisplayName "Apache Tomcat @VERSION_MAJOR_MINOR@ %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.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
goto end
:installed
echo The service '%SERVICE_NAME%' has been installed.
:end
@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 Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
rem are valid and consistent with the selected start-up options and set up the
rem endorsed directory.
rem ---------------------------------------------------------------------------
rem Make sure prerequisite environment variables are set
rem In debug mode we need a real JDK (JAVA_HOME)
if ""%1"" == ""debug"" goto needJavaHome
rem Otherwise either JRE or JDK are fine
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 At least one of these environment variable is needed to run this program
goto exit
:needJavaHome
rem Check if we have a usable JDK
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
set "JRE_HOME=%JAVA_HOME%"
goto okJava
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly.
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
set "JRE_HOME=%JAVA_HOME%"
: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 This environment variable is needed to run this program
goto exit
:okJava
rem Don't override the endorsed dir if the user has set it previously
if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir
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
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"
: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"
:gotRunJdb
goto end
:exit
exit /b 1
:end
exit /b 0
#!/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.
# -----------------------------------------------------------------------------
# Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
# are valid and consistent with the selected start-up options and set up the
# endorsed directory.
# -----------------------------------------------------------------------------
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
if $darwin; then
# Bugzilla 54390
if [ -x '/usr/libexec/java_home' ] ; then
export JAVA_HOME=`/usr/libexec/java_home`
# Bugzilla 37284 (reviewed).
elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
fi
else
JAVA_PATH=`which java 2>/dev/null`
if [ "x$JAVA_PATH" != "x" ]; then
JAVA_PATH=`dirname "$JAVA_PATH" 2>/dev/null`
JRE_HOME=`dirname "$JAVA_PATH" 2>/dev/null`
fi
if [ "x$JRE_HOME" = "x" ]; then
# XXX: Should we try other locations?
if [ -x /usr/bin/java ]; then
JRE_HOME=/usr
fi
fi
fi
if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
echo "At least one of these environment variable is needed to run this program"
exit 1
fi
fi
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 "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"
exit 1
fi
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 "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"
exit 1
fi
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
# 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.
if [ -z "$_RUNJAVA" ]; then
_RUNJAVA="$JRE_HOME"/bin/java
fi
if [ "$os400" != "true" ]; then
if [ -z "$_RUNJDB" ]; then
_RUNJDB="$JAVA_HOME"/bin/jdb
fi
fi
@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 Stop 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%" stop %CMD_LINE_ARGS%
:end
#!/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.
# -----------------------------------------------------------------------------
# Stop 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" stop "$@"
@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 Start 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%" start %CMD_LINE_ARGS%
:end
#!/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.
# -----------------------------------------------------------------------------
# Start 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" start "$@"
@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
#!/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 "$@"
@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
#!/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 "$@"
# -----------------------------------------------------------------------------
# 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.
# -----------------------------------------------------------------------------
# build.properties.sample
#
# This is an example "build.properties" file, used to customize building
# Tomcat for your local environment. It defines the location of all external
# modules that Tomcat depends on. Copy this file to "build.properties"
# in the top-level source directory, and customize it as needed.
# -----------------------------------------------------------------------------
# ----- Version Control Flags -----
version.major=10
version.minor=0
version.build=0
version.patch=0
version.suffix=-M5-dev
# ----- Source control flags -----
git.branch=master
# ----- Build control flags -----
# Note enabling validation uses Checkstyle which is LGPL licensed
ant.version.required=1.9.8
execute.validate=false
execute.test.nio=true
execute.test.nio2=true
# Still requires APR/native library to be present
execute.test.apr=true
# Stop testing if a failure occurs
test.haltonfailure=false
# Activate AccessLog during testing
test.accesslog=false
# Display the tests output on the console
test.verbose=true
# Number of parallel threads to use for testing. The recommended value is one
# thread per core.
# Note: Cobertura code coverage currently requires this to be set to 1. Setting
# a value above one will disable code coverage if enabled.
test.threads=1
# Note the Cobertura code coverage tool is GPLv2 licensed
test.cobertura=false
# Note the FindBugs is LGPL licensed
execute.findbugs=false
# Some platforms (e.g. OSX El Capitan) require IPv4 to be the default for the
# multicast tests to work
java.net.preferIPv4Stack=false
# Specify the default (true) else the empty string will be used which
# effectively changes the setting to false
org.apache.tomcat.util.net.NioSelectorShared=true
# Location of GPG executable (used only for releases)
gpg.exec=/path/to/gpg
# Code signing of Windows installer
do.codesigning=false
codesigning.user=request-via-pmc
codesigning.pwd=request-via-pmc
codesigning.partnercode=request-via-pmc
codesigning.keyStore=request-via-pmc
codesigning.keyStorePassword=request-via-pmc
codesigning.service=Microsoft Windows Signing
# ----- Settings to use when downloading files -----
trydownload.httpusecaches=true
# ----- Default Base Path for Dependent Packages -----
# Please note this path must be absolute, not relative,
# as it is referenced with different working directory
# contexts by the various build scripts.
base.path=${user.home}/tomcat-build-libs
compile.debug=true
# Do not pass -deprecation (-Xlint:deprecation) flag to javac
compile.deprecation=false
base-apache.loc.1=http://www.apache.org/dyn/closer.lua?action=download&filename=
base-apache.loc.2=https://archive.apache.org/dist
base-commons.loc.1=${base-apache.loc.1}/commons
base-commons.loc.2=${base-apache.loc.2}/commons
base-tomcat.loc.1=${base-apache.loc.1}/tomcat
base-tomcat.loc.2=${base-apache.loc.2}/tomcat
base-gh.loc=https://github.com
base-sf.loc=https://downloads.sourceforge.net
# repo.maven.apache.org is the same as repo2.maven.org
base-maven.loc=https://repo.maven.apache.org/maven2
# Mirror, was used when there were problems with the main SF downloads site
# base-sf.loc=https://sunet.dl.sourceforge.net
# ----- Webservices - JAX RPC -----
jaxrpc-lib.version=1.1-rc4
jaxrpc-lib.checksum.enabled=true
jaxrpc-lib.checksum.algorithm=MD5|SHA-1
jaxrpc-lib.checksum.value=4bebba22a4cdb9f68e16c45129770333|fe9371d33dc3e1646d4d13bde19614283eb998b1
jaxrpc-lib.home=${base.path}/jaxrpc-${jaxrpc-lib.version}
jaxrpc-lib.jar=${jaxrpc-lib.home}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
jaxrpc-lib.loc=${base-maven.loc}/geronimo-spec/geronimo-spec-jaxrpc/${jaxrpc-lib.version}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
# ----- Webservices - WSDL4J -----
wsdl4j-lib.version=1.6.3
wsdl4j-lib.checksum.enabled=true
wsdl4j-lib.checksum.algorithm=MD5|SHA-1
wsdl4j-lib.checksum.value=cfc28d89625c5e88589aec7a9aee0208|6d106a6845a3d3477a1560008479312888e94f2f
wsdl4j-lib.home=${base.path}/wsdl4j-${wsdl4j-lib.version}
wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar
wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${wsdl4j-lib.version}.jar
# ----- Eclipse JDT, version 4.7 or later -----#
# See https://cwiki.apache.org/confluence/display/TOMCAT/Managing+Tomcat%27s+Dependency+on+the+Eclipse+JDT+Core+Batch+Compiler
#
# Checksum is from "SHA512 Checksums for 4.15" link at
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.15-202003050155/
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.15-202003050155/checksum/eclipse-4.15-SUMSSHA512
#
jdt.version=4.15
jdt.release=R-4.15-202003050155/
jdt.checksum.enabled=true
jdt.checksum.algorithm=SHA-512
jdt.checksum.value=41311832a593d13ea84eebea087baa3bab16df381c70bd4c0f425caeb69eac1b41be2af27e40735ae16c039df4861fa93c3cfc4c21f84bad1c5eb1cb0e7ad351
jdt.home=${base.path}/ecj-${jdt.version}
jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
# The download will be moved to the archive area eventually. We are taking care of that in advance.
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
# ----- Tomcat native library -----
tomcat-native.version=1.2.23
tomcat-native.src.checksum.enabled=true
tomcat-native.src.checksum.algorithm=SHA-512
tomcat-native.src.checksum.value=89a0363961d322a87f4e752f4727f54f28ac6e4ad10fa21b6b7390c62b041d4068672d95495d9233c1cad7d6c1dc3c85fbd0186894085b3b94e476876af160ee
tomcat-native.win.checksum.enabled=true
tomcat-native.win.checksum.algorithm=SHA-512
tomcat-native.win.checksum.value=b5d91d709241fea5f18fbaf2eb1dbad3c3014309ac72dfc10c0eb7c2f926a8e37a4c326ce251552bbd2b1f15b86c84ae72c33a259cc051765ab4322c91b5721b
tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
tomcat-native.loc.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
tomcat-native.win.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1c-win32-bin.zip
tomcat-native.win.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1c-win32-bin.zip
# ----- NSIS, version 3.0 or later -----
nsis.version=3.04
nsis.checksum.enabled=true
nsis.checksum.algorithm=MD5|SHA-1
nsis.checksum.value=434e89380742d415ca9b91676cb92540|ed241f7384f4e59d84b9a62c71d1f6955b6a719a
nsis.home=${base.path}/nsis-${nsis.version}
nsis.exe=${nsis.home}/makensis.exe
nsis.arch.dir=x86-unicode/
nsis.installoptions.dll=${nsis.home}/Plugins/${nsis.arch.dir}InstallOptions.dll
nsis.nsexec.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsExec.dll
nsis.nsisdl.dll=${nsis.home}/Plugins/${nsis.arch.dir}NSISdl.dll
nsis.system.dll=${nsis.home}/Plugins/${nsis.arch.dir}System.dll
nsis.nsdialogs.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsDialogs.dll
nsis.loc=${base-sf.loc}/nsis/nsis-${nsis.version}.zip
# ----- Commons Daemon, version 1.2.0 or later -----
commons-daemon.version=1.2.2
# checksum for commons-daemon-1.2.1-bin.tar.gz
commons-daemon.bin.checksum.enabled=true
commons-daemon.bin.checksum.algorithm=SHA-512
commons-daemon.bin.checksum.value=f9fb917aaf398f61c42796eb4168664e076f81bc3fae82790eb39c723f03a1e7cbc2304161938d8d8993b7fbb718214b94740dbf9679f6ef93e85b5a2e861761
# checksums for commons-daemon-1.2.1-native-src.tar.gz, commons-daemon-1.2.1-bin-windows.zip
commons-daemon.native.src.checksum.enabled=true
commons-daemon.native.src.checksum.algorithm=SHA-512
commons-daemon.native.src.checksum.value=45ad856a8a6b024e80905cfac5a741a57ab86479ecd65adab9641f5444d3a2362bb13d1ea38ec3db5eb89d30c29f2f6d3b0e48cbf2f60c081c4df2451acd1ab4
commons-daemon.native.win.checksum.enabled=true
commons-daemon.native.win.checksum.algorithm=SHA-512
commons-daemon.native.win.checksum.value=16e7a6fc5bc83ada3bcf9e10cc69ef21400dc019d1f2be00caec0bce72c3bc5a7c72116878e12b4851a15bb473c0948a9c14e1a86b6addcefa6c20638dbcc88c
commons-daemon.home=${base.path}/commons-daemon-${commons-daemon.version}
commons-daemon.jar=${commons-daemon.home}/commons-daemon-${commons-daemon.version}.jar
commons-daemon.native.win.home=${commons-daemon.home}/windows
commons-daemon.native.win.mgr.exe=${commons-daemon.native.win.home}/prunmgr.exe
commons-daemon.native.src.tgz=${commons-daemon.home}/commons-daemon-${commons-daemon.version}-native-src.tar.gz
commons-daemon.native.win.zip=${commons-daemon.home}/commons-daemon-${commons-daemon.version}-bin-windows-signed.zip
commons-daemon.bin.loc.1=${base-commons.loc.1}/daemon/binaries/commons-daemon-${commons-daemon.version}-bin.tar.gz
commons-daemon.bin.loc.2=${base-commons.loc.2}/daemon/binaries/commons-daemon-${commons-daemon.version}-bin.tar.gz
commons-daemon.native.src.loc.1=${base-commons.loc.1}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz
commons-daemon.native.src.loc.2=${base-commons.loc.2}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz
commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip
commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip
# ----- JUnit Unit Test Suite, version 4.11 or later -----
junit.version=4.12
junit.checksum.enabled=true
junit.checksum.algorithm=MD5|SHA-1
junit.checksum.value=5b38c40c97fbd0adee29f91e60405584|2973d150c0dc1fefe998f834810d68f278ea58ec
junit.home=${base.path}/junit-${junit.version}
junit.jar=${junit.home}/junit-${junit.version}.jar
junit.loc=${base-maven.loc}/junit/junit/${junit.version}/junit-${junit.version}.jar
# ----- Hamcrest Library, used by JUnit, version 1.3 or later ----
hamcrest.version=1.3
hamcrest.checksum.enabled=true
hamcrest.checksum.algorithm=MD5|SHA-1
hamcrest.checksum.value=6393363b47ddcbba82321110c3e07519|42a25dc3219429f0e5d060061f71acb49bf010a0
hamcrest.home=${base.path}/hamcrest-${hamcrest.version}
hamcrest.jar=${hamcrest.home}/hamcrest-core-${hamcrest.version}.jar
hamcrest.loc=${base-maven.loc}/org/hamcrest/hamcrest-core/${hamcrest.version}/hamcrest-core-${hamcrest.version}.jar
# ----- EasyMock, version 3.2 or later -----
easymock.version=3.2
easymock.checksum.enabled=true
easymock.checksum.algorithm=MD5|SHA-1
easymock.checksum.value=0da4291328e18798621c36fdf8bc4c3a|00c82f7fa3ef377d8954b1db25123944b5af2ba4
easymock.home=${base.path}/easymock-${easymock.version}
easymock.jar=${easymock.home}/easymock-${easymock.version}.jar
easymock.loc=${base-maven.loc}/org/easymock/easymock/${easymock.version}/easymock-${easymock.version}.jar
# ----- cglib, used by EasyMock, version 2.2 or later -----
cglib.version=2.2.2
cglib.checksum.enabled=true
cglib.checksum.algorithm=MD5|SHA-1
cglib.checksum.value=af93e373d7ddf35db0e9612480d9ed13|00d456bb230c70c0b95c76fb28e429d42f275941
cglib.home=${base.path}/cglib-${cglib.version}
cglib.jar=${cglib.home}/cglib-nodep-${cglib.version}.jar
cglib.loc=${base-maven.loc}/cglib/cglib-nodep/${cglib.version}/cglib-nodep-${cglib.version}.jar
# ----- objenesis, used by EasyMock, version 1.2 or later -----
objenesis.version=1.2
objenesis.checksum.enabled=true
objenesis.checksum.algorithm=MD5|SHA-1
objenesis.checksum.value=bee117291d50b41b8e8cf0ac5435df1d|bfcb0539a071a4c5a30690388903ac48c0667f2a
objenesis.home=${base.path}/objenesis-${objenesis.version}
objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar
objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar
# ----- Checkstyle, version 6.16 or later -----
checkstyle.version=8.22
checkstyle.checksum.enabled=true
checkstyle.checksum.algorithm=SHA-512
checkstyle.checksum.value=d595e284ec440e20367b93a1835357f1c4c2cf77af4589caafdaa995aa9e8a341716ad59f5222fff484275f23c11beb71ad58792cc6cdbdb261e320724b9418f
checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
# ----- Cobertura code coverage tool -----
cobertura.version=2.1.1
cobertura.checksum.enabled=true
cobertura.checksum.algorithm=MD5|SHA-1
cobertura.checksum.value=4f46638aa8e4d89565c038092398ea06|99cb44d36555feedcedc46263c23c2f5394ef342
cobertura.home=${base.path}/cobertura-${cobertura.version}
cobertura.jar=${cobertura.home}/cobertura-${cobertura.version}.jar
cobertura.loc=${base-sf.loc}/cobertura/cobertura-${cobertura.version}-bin.tar.gz
# ----- Findbugs -----
findbugs.version=3.1.12
findbugs.checksum.enabled=true
findbugs.checksum.algorithm=MD5|SHA-1
findbugs.checksum.value=8c54502a8e1b78ea6b173a186ce6f379|95114d9aaeeba7bd4ea5a3d6a2167cd6c87bb943
findbugs.home=${base.path}/spotbugs-${findbugs.version}
findbugs.jar=${findbugs.home}/lib/spotbugs-ant.jar
findbugs.loc=${base-maven.loc}/com/github/spotbugs/spotbugs/${findbugs.version}/spotbugs-${findbugs.version}.tgz
# ----- SAAJ API, used by Code Signing for releases -----
# ----- No longer part of JRE from Java 11 onwards -----
# ----- CDDL Licensed -----
saaj-api.version=1.3.5
saaj-api.checksum.enabled=true
saaj-api.checksum.algorithm=MD5|SHA-1
saaj-api.checksum.value=caae8b4bf2c551155815331e9e96256f|1c399a7fea4d0262a6a39750e419c24f0c769586
saaj-api.home=${base.path}/saaj-api-${saaj-api.version}
saaj-api.jar=${saaj-api.home}/saaj-api-${saaj-api.version}.jar
saaj-api.loc=${base-maven.loc}/javax/xml/soap/saaj-api/${saaj-api.version}/saaj-api-${saaj-api.version}.jar
# ----- bnd & bndlib, version 4.0.0 or later -----
# ----- provides OSGI metadata for JARs -----
bnd.version=4.2.0
# checksums for biz.aQute.bnd-4.2.0.jar, biz.aQute.bndlib-4.2.0.jar
bnd.checksum.enabled=true
bnd.checksum.algorithm=MD5|SHA-1
bnd.checksum.value=ca26a671ea67bf75d83b1588bdd68923|d4bc96b2619f95e596bbf3f725f3b077e96c5d43
bndlib.checksum.enabled=true
bndlib.checksum.algorithm=MD5|SHA-1
bndlib.checksum.value=7519e890783ade99bb74608d0efbf8c4|c4fa30ac11cc0bf27b1f706ac8ebae8cec358e77
bnd.home=${base.path}/bnd-${bnd.version}
bnd.jar=${bnd.home}/biz.aQute.bnd-${bnd.version}.jar
bnd.loc=${base-maven.loc}/biz/aQute/bnd/biz.aQute.bnd/${bnd.version}/biz.aQute.bnd-${bnd.version}.jar
bndlib.home=${base.path}/bndlib-${bnd.version}
bndlib.jar=${bndlib.home}/biz.aQute.bndlib-${bnd.version}.jar
bndlib.loc=${base-maven.loc}/biz/aQute/bnd/biz.aQute.bndlib/${bnd.version}/biz.aQute.bndlib-${bnd.version}.jar
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project name="Tomcat 9.0" default="deploy" basedir="."
xmlns:if="ant:if" xmlns:unless="ant:unless">
<!-- ===================== Initialize Property Values ==================== -->
<!-- We read customizable properties from "build.properties.default" -->
<!-- and also from "build.properties" if it exists. -->
<!-- The values in "build.properties" have stronger preference. -->
<!-- If you want to customize your build, you can either change the values -->
<!-- directly in the default file, or create a new build.properties and -->
<!-- set the values there. This way you don't have to change a file which -->
<!-- is part of the original project source code. -->
<!-- See "build.properties.default" in the top level directory for some -->
<!-- property values you may customize. -->
<property file="${user.home}/build.properties"/>
<property file="build.properties"/>
<property file="build.properties.default"/>
<!-- Check Ant Version -->
<fail message="Ant version ${ant.version.required} or newer is required (${ant.version} is installed)">
<condition>
<not><antversion atleast="${ant.version.required}" /></not>
</condition>
</fail>
<!-- Project Name -->
<property name="project" value="apache-tomcat" />
<!-- Version numbers -->
<property name="version" value="${version.major}.${version.minor}.${version.build}${version.suffix}" />
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}" />
<property name="version.major.minor" value="${version.major}.${version.minor}" />
<!-- constant to declare a file binary for md5sum -->
<property name="md5sum.binary-prefix" value=" *" />
<!-- Exact spec versions (for the manifests etc.) -->
<property name="servlet.spec.version" value="5.0" />
<property name="servlet.revision" value="0-M1" />
<property name="jsp.spec.version" value="3.0" />
<property name="jsp.revision" value="0-M1" />
<property name="el.spec.version" value="4.0" />
<property name="el.revision" value="0-M1" />
<property name="websocket.spec.version" value="2.0" />
<property name="websocket.revision" value="0-M1" />
<property name="jaspic.spec.version" value="2.0" />
<property name="jaspic.revision" value="0-M1" />
<property name="annotation.spec.version" value="2.0" />
<property name="annotation.revision" value="0-M1" />
<!-- Release artifact base names -->
<property name="final.name" value="${project}-${version}" />
<property name="final-src.name" value="${project}-${version}-src" />
<!-- Locations to create build artifacts -->
<property name="tomcat.home" value="${basedir}"/>
<property name="tomcat-nb.home" value="${basedir}/nbproject" />
<property name="tomcat.output" value="${basedir}/output"/>
<property name="tomcat.bnd" value="${tomcat.output}/bnd"/>
<property name="tomcat.build" value="${tomcat.output}/build"/>
<property name="tomcat.classes" value="${tomcat.output}/classes"/>
<property name="tomcat.deployer" value="${tomcat.output}/deployer"/>
<property name="tomcat.dist" value="${tomcat.output}/dist"/>
<property name="tomcat.embed" value="${tomcat.output}/embed"/>
<property name="tomcat.embed.sources" value="${tomcat.output}/embed-src-jars"/>
<property name="tomcat.manifests" value="${tomcat.output}/manifests"/>
<property name="tomcat.release" value="${tomcat.output}/release"/>
<property name="tomcat.src.jars" value="${tomcat.output}/src-jars"/>
<property name="test.classes" value="${tomcat.output}/testclasses"/>
<property name="test.run.classes" value="${tomcat.output}/classes"/>
<property name="test.temp" value="${tomcat.output}/test-tmp"/>
<property name="test.basedir" value="${tomcat.build}"/>
<property name="test.reports" value="${test.basedir}/logs"/>
<property name="test.apr.loc" value="${test.basedir}/bin"/>
<!-- base directory for jdbc-pool -->
<property name="tomcat.jdbc.dir" value="${basedir}/modules/jdbc-pool"/>
<!-- build output directory for jdbc-pool -->
<property name="tomcat.pool" value="${tomcat.output}/jdbc-pool"/>
<!-- Jakarta EE 9 specs requires Java 8+ -->
<property name="compile.source" value="8"/>
<property name="compile.target" value="8"/>
<property name="compile.release" value="8"/>
<property name="min.java.version" value="8"/>
<!-- Locations to create the JAR artifacts -->
<!-- Standard JARs -->
<property name="bootstrap.jar" value="${tomcat.build}/bin/bootstrap.jar"/>
<property name="tomcat-juli.jar" value="${tomcat.build}/bin/tomcat-juli.jar"/>
<property name="annotations-api.jar" value="${tomcat.build}/lib/annotations-api.jar"/>
<property name="servlet-api.jar" value="${tomcat.build}/lib/servlet-api.jar"/>
<property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
<property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
<property name="websocket-api.jar" value="${tomcat.build}/lib/websocket-api.jar"/>
<property name="jaspic-api.jar" value="${tomcat.build}/lib/jaspic-api.jar"/>
<property name="tomcat-websocket.jar" value="${tomcat.build}/lib/tomcat-websocket.jar"/>
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
<property name="catalina-tribes.jar" value="${tomcat.build}/lib/catalina-tribes.jar"/>
<property name="catalina-ssi.jar" value="${tomcat.build}/lib/catalina-ssi.jar"/>
<property name="catalina-ha.jar" value="${tomcat.build}/lib/catalina-ha.jar"/>
<property name="catalina-ant.jar" value="${tomcat.build}/lib/catalina-ant.jar"/>
<property name="catalina-storeconfig.jar" value="${tomcat.build}/lib/catalina-storeconfig.jar"/>
<property name="tomcat-coyote.jar" value="${tomcat.build}/lib/tomcat-coyote.jar"/>
<property name="tomcat-dbcp.jar" value="${tomcat.build}/lib/tomcat-dbcp.jar"/>
<property name="tomcat-jni.jar" value="${tomcat.build}/lib/tomcat-jni.jar"/>
<property name="tomcat-api.jar" value="${tomcat.build}/lib/tomcat-api.jar"/>
<property name="tomcat-util.jar" value="${tomcat.build}/lib/tomcat-util.jar"/>
<property name="tomcat-util-scan.jar" value="${tomcat.build}/lib/tomcat-util-scan.jar"/>
<property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
<property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
<!-- Standard Source JARs -->
<property name="bootstrap-src.jar" value="${tomcat.src.jars}/bootstrap-src.jar"/>
<property name="tomcat-juli-src.jar" value="${tomcat.src.jars}/tomcat-juli-src.jar"/>
<property name="annotations-api-src.jar" value="${tomcat.src.jars}/annotations-api-src.jar"/>
<property name="servlet-api-src.jar" value="${tomcat.src.jars}/servlet-api-src.jar"/>
<property name="jsp-api-src.jar" value="${tomcat.src.jars}/jsp-api-src.jar"/>
<property name="el-api-src.jar" value="${tomcat.src.jars}/el-api-src.jar"/>
<property name="websocket-api-src.jar" value="${tomcat.src.jars}/websocket-api-src.jar"/>
<property name="jaspic-api-src.jar" value="${tomcat.src.jars}/jaspic-api-src.jar"/>
<property name="tomcat-websocket-src.jar" value="${tomcat.src.jars}/tomcat-websocket-src.jar"/>
<property name="catalina-src.jar" value="${tomcat.src.jars}/catalina-src.jar"/>
<property name="catalina-tribes-src.jar" value="${tomcat.src.jars}/catalina-tribes-src.jar"/>
<property name="catalina-ssi-src.jar" value="${tomcat.src.jars}/catalina-ssi-src.jar"/>
<property name="catalina-ha-src.jar" value="${tomcat.src.jars}/catalina-ha-src.jar"/>
<property name="catalina-ant-src.jar" value="${tomcat.src.jars}/catalina-ant-src.jar"/>
<property name="catalina-storeconfig-src.jar" value="${tomcat.src.jars}/catalina-storeconfig-src.jar"/>
<property name="tomcat-jni-src.jar" value="${tomcat.src.jars}/tomcat-jni-src.jar"/>
<property name="tomcat-coyote-src.jar" value="${tomcat.src.jars}/tomcat-coyote-src.jar"/>
<property name="tomcat-dbcp-src.jar" value="${tomcat.src.jars}/tomcat-dbcp-src.jar"/>
<property name="tomcat-api-src.jar" value="${tomcat.src.jars}/tomcat-api-src.jar"/>
<property name="tomcat-util-src.jar" value="${tomcat.src.jars}/tomcat-util-src.jar"/>
<property name="tomcat-util-scan-src.jar" value="${tomcat.src.jars}/tomcat-util-scan-src.jar"/>
<property name="jasper-src.jar" value="${tomcat.src.jars}/jasper-src.jar"/>
<property name="jasper-el-src.jar" value="${tomcat.src.jars}/jasper-el-src.jar"/>
<!-- Embedded JARs & source JARs -->
<property name="tomcat-embed-core.jar" value="${tomcat.embed}/tomcat-embed-core.jar"/>
<property name="tomcat-embed-jasper.jar" value="${tomcat.embed}/tomcat-embed-jasper.jar"/>
<property name="tomcat-embed-el.jar" value="${tomcat.embed}/tomcat-embed-el.jar"/>
<property name="tomcat-embed-websocket.jar" value="${tomcat.embed}/tomcat-embed-websocket.jar"/>
<property name="tomcat-embed-core-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-core-src.jar"/>
<property name="tomcat-embed-jasper-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-jasper-src.jar"/>
<property name="tomcat-embed-el-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-el-src.jar"/>
<property name="tomcat-embed-websocket-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-websocket-src.jar"/>
<!-- jdbc-pool JARs & source JARs -->
<property name="tomcat-jdbc.jar" value="${tomcat.pool}/tomcat-jdbc.jar"/>
<property name="tomcat-jdbc-src.jar" value="${tomcat.pool}/tomcat-jdbc-src.jar"/>
<!-- Tests To Run -->
<property name="test.name" value="**/Test*.java"/>
<property name="test.formatter" value="-Dorg.apache.juli.formatter=java.util.logging.SimpleFormatter"/>
<property name="test.relaxTiming" value="false"/>
<!-- Cobertura code coverage settings -->
<property name="cobertura.out" value="${tomcat.output}/coverage"/>
<property name="cobertura.datafile" value="${cobertura.out}/cobertura.ser"/>
<property name="tomcat.classes.cobertura" value="${tomcat.classes}-cobertura"/>
<property name="cobertura.report.format" value="html"/>
<!-- FindBugs settings -->
<property name="findbugs.out" value="${tomcat.output}/findbugs"/>
<property name="findbugs.report.format" value="html"/>
<property name="findbugs.report.level" value="low"/>
<!-- Workaround against http://bugs.sun.com/view_bug.do?bug_id=6202721 -->
<available file="/dev/urandom" property="test.jvmarg.egd" value="-Djava.security.egd=file:/dev/./urandom"/>
<property name="test.jvmarg.egd" value="" />
<!-- Location of OpenSSL binary (file name, not directory) -->
<!-- The OpenSSL tests cases be disabled by specifying an invalid path here -->
<property name="test.openssl.path" value="" />
<!-- Include .gitignore in src distributions. -->
<!-- .git and .gitignore are in defaultexcludes since Ant 1.8.2 -->
<defaultexcludes add="**/.git" />
<defaultexcludes add="**/.git/**" />
<defaultexcludes remove="**/.gitignore" />
<!--<defaultexcludes echo="true" />-->
<!-- Java 9 -->
<available classname="java.lang.reflect.InaccessibleObjectException"
property="java9.javadoc.options"
value="-html5"/>
<property name="java9.javadoc.options" value=""/>
<available classname="java.lang.reflect.InaccessibleObjectException"
property="java9.test.option.1"
value="--add-opens=java.base/java.lang=ALL-UNNAMED"/>
<property name="java9.test.option.1" value="-Dtest.1=1"/>
<available classname="java.lang.reflect.InaccessibleObjectException"
property="java9.test.option.2"
value="--add-opens=java.base/java.io=ALL-UNNAMED"/>
<property name="java9.test.option.2" value="-Dtest.2=2"/>
<available classname="java.lang.reflect.InaccessibleObjectException"
property="java9.test.option.3"
value="--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"/>
<property name="java9.test.option.3" value="-Dtest.3=3"/>
<!-- Classpaths -->
<path id="compile.classpath">
<pathelement location="${jdt.jar}"/>
<pathelement location="${saaj-api.jar}"/>
<pathelement location="${jaxrpc-lib.jar}"/>
<pathelement location="${wsdl4j-lib.jar}"/>
</path>
<path id="tomcat.classpath">
<pathelement path="${test.run.classes}"/>
</path>
<path id="tomcat.test.classpath">
<pathelement location="${test.basedir}/webapps/examples/WEB-INF/classes"/>
<pathelement location="${test.classes}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${hamcrest.jar}"/>
<pathelement location="${easymock.jar}"/>
<pathelement location="${cglib.jar}"/>
<pathelement location="${objenesis.jar}"/>
<path refid="compile.classpath" />
<path refid="tomcat.classpath" />
</path>
<!-- Version info filter set -->
<tstamp>
<format property="year" pattern="yyyy" locale="en" timezone="UTC"/>
<format property="today" pattern="MMM d yyyy" locale="en" timezone="UTC"/>
<format property="today-iso-8601" pattern="yyyy-MM-dd" locale="en" timezone="UTC"/>
<format property="tstamp" pattern="HH:mm:ss" locale="en" timezone="UTC"/>
</tstamp>
<filterset id="version.filters">
<filter token="YEAR" value="${year}"/>
<filter token="VERSION" value="${version}"/>
<filter token="VERSION_NUMBER" value="${version.number}"/>
<filter token="VERSION_MAJOR" value="${version.major}"/>
<filter token="VERSION_MAJOR_MINOR" value="${version.major.minor}"/>
<filter token="VERSION_BUILT" value="${today} ${tstamp} UTC"/>
<filter token="JDT_VERSION" value="${jdt.version}"/>
<filter token="GIT_BRANCH" value="${git.branch}"/>
<filter token="MIN_JAVA_VERSION" value="${min.java.version}"/>
</filterset>
<!-- Files to change line endings for depending on target platform -->
<patternset id="text.files" >
<include name="**/INSTALLLICENSE"/>
<include name="**/KEYS"/>
<include name="**/LICENSE"/>
<include name="**/NOTICE"/>
<include name="**/RELEASE-NOTES"/>
<include name="**/jakarta.servlet.ServletContainerInitializer"/>
<include name="**/jakarta.websocket.ContainerProvider"/>
<include name="**/jakarta.websocket.server.ServerEndpointConfig$Configurator"/>
<include name="**/.gitignore"/>
<include name="**/*.bnd"/>
<include name="**/*.classpath"/>
<include name="**/*.css"/>
<include name="**/*.dtd"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.iml"/>
<include name="**/*.ini"/>
<include name="**/*.java"/>
<include name="**/*.jj"/>
<include name="**/*.jjt"/>
<include name="**/*.json"/>
<include name="**/*.jsp"/>
<include name="**/*.jspf"/>
<include name="**/*.jspx"/>
<include name="**/*.launch"/>
<include name="**/*.license"/>
<include name="**/*.manifest"/>
<include name="**/*.md"/>
<include name="**/*.mdl"/>
<include name="**/*.MF"/>
<include name="**/*.notice"/>
<include name="**/*.nsi"/>
<include name="**/*.pem"/>
<include name="**/*.pl"/>
<include name="**/*.policy"/>
<include name="**/*.pom"/>
<include name="**/*.project"/>
<include name="**/*.properties"/>
<include name="**/*.properties.default"/>
<include name="**/*.shtml"/>
<include name="**/*.svg"/>
<include name="**/*.tag"/>
<include name="**/*.tagx"/>
<include name="**/*.tasks"/>
<include name="**/*.tld"/>
<include name="**/*.txt"/>
<include name="**/*.xhtml"/>
<include name="**/*.xml"/>
<include name="**/*.xsd"/>
<include name="**/*.xsl"/>
<include name="**/*.yaml"/>
<include name="**/Dockerfile"/>
<!-- Exclude files that use 16-bit encodings. -->
<!-- This prevents fixcrlf corrupting them during a release -->
<exclude name="**/bom-none-prolog-utf16?e.jspx"/>
<exclude name="**/bom-utf16?e-prolog-*.jsp*"/>
</patternset>
<!-- ========= Pattern sets used to control content of JAR files ========= -->
<!-- Pattern sets for jar files in standard distributions -->
<patternset id="files.annotations-api">
<include name="jakarta/annotation/**" />
</patternset>
<patternset id="files.servlet-api">
<include name="jakarta/servlet/*" />
<include name="jakarta/servlet/annotation/**" />
<include name="jakarta/servlet/descriptor/**" />
<include name="jakarta/servlet/http/**" />
<include name="jakarta/servlet/resources/**" />
<exclude name="jakarta/servlet/jsp"/>
</patternset>
<patternset id="files.jsp-api">
<include name="jakarta/servlet/jsp/**" />
</patternset>
<patternset id="files.el-api">
<include name="jakarta/el/**" />
</patternset>
<patternset id="files.websocket-api">
<include name="jakarta/websocket/**" />
</patternset>
<patternset id="files.jaspic-api">
<include name="jakarta/security/auth/message/**" />
</patternset>
<patternset id="files.tomcat-websocket">
<include name="org/apache/tomcat/websocket/**" />
</patternset>
<!-- This duplicates some classes in files.catalina -->
<!-- Duplicating a few classes in bootstrap.jar is simpler than excluding -->
<!-- them from files.catalina and having to manually add them to -->
<!-- files.tomcat-embed-core because of an include/exclude conflict -->
<!-- between files.catalina and files.bootstrap. -->
<patternset id="files.bootstrap">
<include name="org/apache/catalina/startup/Bootstrap.*" />
<include name="org/apache/catalina/startup/catalina.properties" />
<include name="org/apache/catalina/startup/CatalinaProperties.*" />
<include name="org/apache/catalina/startup/ClassLoaderFactory.*" />
<include name="org/apache/catalina/startup/ClassLoaderFactory$*.*" />
<include name="org/apache/catalina/startup/SafeForkJoinWorkerThreadFactory.*" />
<include name="org/apache/catalina/startup/SafeForkJoinWorkerThreadFactory$*.*" />
<include name="org/apache/catalina/startup/Tool.*" />
<include name="org/apache/catalina/security/SecurityClassLoad.*" />
<include name="org/apache/catalina/webresources/war/**" />
<include name="org/apache/tomcat/util/buf/UriUtil.*" />
</patternset>
<patternset id="files.tomcat-juli">
<include name="org/apache/juli/**" />
</patternset>
<patternset id="files.tomcat-api">
<include name="org/apache/tomcat/*" />
<exclude name="org/apache/tomcat/buildutil" />
<exclude name="org/apache/tomcat/dbcp" />
<exclude name="org/apache/tomcat/jni" />
<exclude name="org/apache/tomcat/util" />
<exclude name="org/apache/tomcat/websocket" />
</patternset>
<patternset id="files.tomcat-util">
<include name="org/apache/tomcat/util/buf/**" />
<include name="org/apache/tomcat/util/codec/**" />
<include name="org/apache/tomcat/util/collections/**" />
<include name="org/apache/tomcat/util/compat/**" />
<include name="org/apache/tomcat/util/file/**" />
<include name="org/apache/tomcat/util/res/**" />
<include name="org/apache/tomcat/util/security/**" />
<include name="org/apache/tomcat/util/threads/**" />
<include name="org/apache/tomcat/util/json/**" />
<include name="org/apache/tomcat/util/*" />
<exclude name="org/apache/tomcat/util/bcel" />
<exclude name="org/apache/tomcat/util/descriptor" />
<exclude name="org/apache/tomcat/util/digester" />
<exclude name="org/apache/tomcat/util/http" />
<exclude name="org/apache/tomcat/util/log" />
<exclude name="org/apache/tomcat/util/modeler" />
<exclude name="org/apache/tomcat/util/net" />
<exclude name="org/apache/tomcat/util/scan" />
</patternset>
<patternset id="files.tomcat-util-scan">
<include name="org/apache/tomcat/util/descriptor/**" />
<include name="org/apache/tomcat/util/digester/**" />
<include name="org/apache/tomcat/util/scan/**" />
</patternset>
<patternset id="files.catalina">
<include name="org/apache/catalina/**" />
<include name="org/apache/naming/**" />
<!-- Modules -->
<exclude name="org/apache/catalina/ant/**" />
<exclude name="org/apache/catalina/ha/**" />
<exclude name="org/apache/catalina/tribes/**" />
<exclude name="org/apache/catalina/storeconfig/**" />
<exclude name="org/apache/catalina/ssi/**" />
</patternset>
<patternset id="files.catalina-tribes">
<include name="org/apache/catalina/tribes/**" />
</patternset>
<patternset id="files.catalina-ssi">
<include name="org/apache/catalina/ssi/**" />
</patternset>
<patternset id="files.catalina-ha">
<include name="org/apache/catalina/ha/**" />
</patternset>
<patternset id="files.catalina-ant">
<include name="org/apache/catalina/ant/**" />
</patternset>
<patternset id="files.catalina-storeconfig">
<include name="org/apache/catalina/storeconfig/**" />
</patternset>
<patternset id="files.tomcat-jni">
<include name="org/apache/tomcat/jni/**" />
</patternset>
<patternset id="files.tomcat-coyote">
<include name="org/apache/coyote/**" />
<!-- Remaining tomcat-util packages -->
<include name="org/apache/tomcat/util/bcel/**" />
<include name="org/apache/tomcat/util/http/**" />
<include name="org/apache/tomcat/util/log/**" />
<include name="org/apache/tomcat/util/modeler/**" />
<include name="org/apache/tomcat/util/net/**" />
</patternset>
<patternset id="files.jasper">
<include name="org/apache/jasper/**" />
</patternset>
<patternset id="files.jasper-el">
<include name="org/apache/el/**" />
</patternset>
<patternset id="files.tomcat-dbcp">
<include name="org/apache/tomcat/dbcp/**"/>
</patternset>
<!-- Pattern sets for embedded JARs -->
<!-- Every standard pattern set above should be included in an embedded JAR -->
<patternset id="files.tomcat-embed-core" >
<patternset refid="files.catalina" />
<patternset refid="files.servlet-api" />
<patternset refid="files.jaspic-api" />
<patternset refid="files.tomcat-api" />
<patternset refid="files.tomcat-juli" />
<!-- These pattern sets conflict so include files directly
<patternset refid="files.tomcat-coyote" />
<patternset refid="files.tomcat-util" />
<patternset refid="files.tomcat-util-scan" />
-->
<include name="org/apache/coyote/**" />
<include name="org/apache/tomcat/jni/**" />
<include name="org/apache/jk/**" />
<include name="org/apache/tomcat/util/**" />
</patternset>
<patternset id="files.tomcat-embed-jasper" >
<patternset refid="files.jasper" />
<patternset refid="files.jsp-api" />
</patternset>
<patternset id="files.tomcat-embed-el" >
<patternset refid="files.el-api" />
<patternset refid="files.jasper-el" />
</patternset>
<patternset id="files.tomcat-embed-websocket" >
<patternset refid="files.websocket-api" />
<patternset refid="files.tomcat-websocket" />
</patternset>
<!-- Pattern sets not included in embedded -->
<!-- Cluster support not included in embedded -->
<!--<patternset refid="files.catalina-tribes" />-->
<!--<patternset refid="files.catalina-ha" />-->
<!-- Ant tasks not included in embedded -->
<!--<patternset refid="files.catalina-ant" />-->
<!-- Annotations API is a separate dependency to avoid JRE 9 issues -->
<!-- See BZ 61439 -->
<!--<patternset refid="files.annotations-api" />-->
<!-- =========================== Build targets =========================== -->
<!-- Output the merged properties for the current Ant environment -->
<target name="echoproperties">
<echoproperties/>
</target>
<target name="build-prepare">
<!-- Required so we can compile -->
<mkdir dir="${tomcat.classes}"/>
<!-- Ensure these directories are removed every time we re-build -->
<delete dir="${tomcat.build}/temp" />
<delete dir="${tomcat.build}/work" />
<!-- Minimum dirs needed for a working Tomcat instance -->
<mkdir dir="${tomcat.build}"/>
<mkdir dir="${tomcat.build}/bin"/>
<mkdir dir="${tomcat.build}/conf"/>
<mkdir dir="${tomcat.build}/lib"/>
<mkdir dir="${tomcat.build}/logs"/>
<mkdir dir="${tomcat.build}/temp"/>
<mkdir dir="${tomcat.build}/webapps"/>
<!-- Property that determines if manifests need updating -->
<uptodate property="manifests.uptodate"
targetfile="${tomcat.manifests}/default.manifest" >
<srcfiles file="${user.home}/build.properties" />
<srcfiles file="${basedir}/build.properties" />
<srcfiles file="${basedir}/build.properties.default" />
<srcfiles file="${basedir}/build.xml" />
<srcfiles dir="${tomcat.home}/res/META-INF" >
<include name="*.manifest" />
<include name="*.license" />
<include name="*.notice" />
</srcfiles>
</uptodate>
<!-- Property that determines if OSGI bnd files need updating -->
<uptodate property="bnd.uptodate"
targetfile="${tomcat.bnd}/annotations-api.bnd" >
<srcfiles file="${user.home}/build.properties" />
<srcfiles file="${basedir}/build.properties" />
<srcfiles file="${basedir}/build.properties.default" />
<srcfiles file="${basedir}/build.xml" />
<srcfiles dir="${tomcat.home}/res/bnd" >
<include name="*.bnd" />
</srcfiles>
</uptodate>
</target>
<target name="validate" if="${execute.validate}"
depends="build-prepare,compile-prepare,download-validate"
description="Uses Checkstyle tool to perform style check for the source code">
<!-- Required so we can cache checkstyle results -->
<mkdir dir="${tomcat.output}/res/checkstyle"/>
<available property="checkstyletask.properties" resource="checkstyletask.properties"
classpath="${checkstyle.jar}" value="checkstyletask.properties"/>
<available property="checkstyletask.properties" resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
classpath="${checkstyle.jar}" value="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"/>
<taskdef resource="${checkstyletask.properties}"
classpath="${checkstyle.jar}" />
<checkstyle config="res/checkstyle/checkstyle.xml">
<fileset dir="." >
<patternset refid="text.files" />
<include name="**/*.bat"/>
<include name="**/*.sh"/>
<exclude name="bin/setenv.*"/>
<exclude name=".*/**"/>
<exclude name="nbproject/**"/>
<exclude name="output/**"/>
<exclude name="modules/**"/>
<exclude name="**/*.mdl"/>
<exclude name="**/*.pem"/>
<exclude name="**/*.svg"/>
<exclude name="**/*_2.xml"/>
<exclude name="res/checkstyle/header-al2.txt"/>
<!-- Exclude auto-generated files -->
<exclude name="java/org/apache/el/parser/ELParser.jj" />
<exclude name="java/org/apache/el/parser/ELParser*.java" />
<exclude name="java/org/apache/el/parser/Node.java" />
<exclude name="java/org/apache/**/parser/JJT*ParserState.java" />
<exclude name="java/org/apache/**/parser/ParseException.java" />
<exclude name="java/org/apache/**/parser/SimpleCharStream.java" />
<exclude name="java/org/apache/**/parser/Token*.java" />
<exclude name="java/org/apache/tomcat/util/json/*.java" />
<!-- Exclude simple test files -->
<exclude name="test/webapp/bug53257/**/*.txt"/>
<exclude name="test/webapp/bug49nnn/bug49464*"/>
<exclude name="test/webapp-fragments/WEB-INF/classes/*.txt"/>
<exclude name="test/webresources/**"/>
<!-- Exclude test files with unusual encodings -->
<exclude name="test/webapp/jsp/encoding/**"/>
<!-- Exclude developer specific local files -->
<exclude name="build.properties" />
<exclude name="res/maven/mvn.properties" />
</fileset>
<fileset dir="modules/jdbc-pool" >
<exclude name=".*/**"/>
<exclude name="**/MANIFEST.MF"/>
<patternset refid="text.files" />
<!-- Exclude developer specific local files -->
<exclude name="build.properties" />
</fileset>
</checkstyle>
<!-- jakarta package checks -->
<checkstyle config="res/checkstyle/jakarta-checkstyle.xml">
<fileset dir="java/jakarta" >
<include name="**/*.java"/>
</fileset>
</checkstyle>
<!-- javax package checks -->
<checkstyle config="res/checkstyle/javax-checkstyle.xml">
<fileset dir="java/javax" >
<include name="**/*.java"/>
</fileset>
</checkstyle>
<!-- org package checks -->
<checkstyle config="res/checkstyle/org-checkstyle.xml">
<fileset dir="java/org" >
<include name="**/*.java"/>
</fileset>
</checkstyle>
</target>
<target name="validate-eoln" depends="build-prepare,compile-prepare"
description="Validate that the source files have correct line ends">
<!-- Compile the CheckEol class only. Note that the class depends on
Ant only. There is no need to download additional dependencies nor
add them to the class path. The rest should be the same as in "compile"
target.-->
<javac srcdir="java" destdir="${tomcat.classes}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
release="${compile.release}"
encoding="ISO-8859-1"
includeAntRuntime="true" >
<!-- Uncomment this to show unchecked warnings:
<compilerarg value="-Xlint:unchecked"/>
-->
<include name="org/apache/tomcat/buildutil/CheckEol*" />
</javac>
<taskdef name="checkeol"
classname="org.apache.tomcat.buildutil.CheckEol"
classpath="${tomcat.classes}" />
<checkeol mode="LF">
<fileset dir="." >
<patternset refid="text.files" />
<include name="**/*.bat"/>
<include name="**/*.sh"/>
<exclude name=".*/**"/>
<exclude name="nbproject/**"/>
<exclude name="output/**"/>
<exclude name="modules/**"/>
<!-- Exclude these since some svn clients do not seem able to handle
UTF-16 line-ending conversion -->
<exclude name="test/webapp/jsp/encoding/bom-utf16*"/>
<exclude name="test/webapp/jsp/encoding/bom-none-prolog-utf16*"/>
</fileset>
<fileset dir="modules/jdbc-pool" >
<patternset refid="text.files" />
</fileset>
</checkeol>
</target>
<target name="compile-prepare">
<!-- Add the builtin catalina.properties -->
<copy todir="java/org/apache/catalina/startup"
file="conf/catalina.properties" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<!-- Copy jdbc-pool documentation -->
<copy tofile="webapps/docs/jdbc-pool.xml"
file="${tomcat.jdbc.dir}/doc/jdbc-pool.xml" encoding="UTF-8">
<filterset>
<filter token="TOMCAT_PROJECT_DEST" value="project.xml"/>
</filterset>
</copy>
</target>
<target name="compile" depends="download-compile,validate">
<!-- Compile internal server components -->
<javac srcdir="java" destdir="${tomcat.classes}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
release="${compile.release}"
encoding="ISO-8859-1"
includeAntRuntime="true" >
<!-- Uncomment this to show unchecked warnings:
<compilerarg value="-Xlint:unchecked"/>
-->
<classpath refid="compile.classpath" />
</javac>
<!-- Copy static resource files -->
<copy todir="${tomcat.classes}" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir="java">
<include name="**/*.properties"/>
<exclude name="**/LocalStrings*.properties"/>
<exclude name="**/Messages*.properties"/>
<include name="**/*.dtd"/>
<include name="**/*.tasks"/>
<include name="**/*.xsd"/>
<include name="**/*.xml"/>
</fileset>
</copy>
<!-- Convert the message files from UTF-8 to ASCII. This can be removed
after upgrading to Java 9+ as the minimum JRE and specifying the encoding
when loading the ResourceBundles -->
<native2ascii src="java" dest="${tomcat.classes}" includes="**/LocalStrings*.properties,**/Messages*.properties" encoding="UTF-8"/>
</target>
<target name="build-manifests" unless="manifests.uptodate"
depends="build-prepare">
<!-- Filtering tokens for JAR manifests-->
<filter token="source.jdk" value="${compile.source}"/>
<filter token="target.jdk" value="${compile.target}"/>
<filter token="servlet.spec.version" value="${servlet.spec.version}"/>
<filter token="servlet.revision" value="${servlet.revision}"/>
<filter token="jsp.spec.version" value="${jsp.spec.version}"/>
<filter token="jsp.revision" value="${jsp.revision}"/>
<filter token="el.spec.version" value="${el.spec.version}"/>
<filter token="el.revision" value="${el.revision}"/>
<filter token="websocket.spec.version" value="${websocket.spec.version}"/>
<filter token="websocket.revision" value="${websocket.revision}"/>
<filter token="jaspic.spec.version" value="${jaspic.spec.version}"/>
<filter token="jaspic.revision" value="${jaspic.revision}"/>
<filter token="annotation.spec.version" value="${annotation.spec.version}"/>
<filter token="annotation.revision" value="${annotation.revision}"/>
<mkdir dir="${tomcat.manifests}" />
<copy todir="${tomcat.manifests}" overwrite="yes" filtering="yes"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir="${tomcat.home}/res/META-INF" />
</copy>
</target>
<target name="build-bnd" unless="bnd.uptodate"
depends="setup-bnd,build-prepare">
<mkdir dir="${tomcat.bnd}" />
<copy todir="${tomcat.bnd}" overwrite="yes" filtering="yes"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir="${tomcat.home}/res/bnd" />
</copy>
</target>
<target name="package" depends="compile,build-manifests,build-bnd" >
<!-- Common Annotations JAR File -->
<jarIt jarfile="${annotations-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest"
addOSGi="true" />
<!-- Servlet Implementation JAR File -->
<jarIt jarfile="${servlet-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.servlet-api"
manifest="${tomcat.manifests}/servlet-api.jar.manifest"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license"
addOSGi="true" />
<!-- JSP Implementation JAR File -->
<jarIt jarfile="${jsp-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.jsp-api"
manifest="${tomcat.manifests}/jsp-api.jar.manifest"
addOSGi="true" />
<!-- EL Implementation JAR File -->
<jarIt jarfile="${el-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.el-api"
manifest="${tomcat.manifests}/el-api.jar.manifest"
addOSGi="true" />
<!-- WebSocket API JAR File -->
<jarIt jarfile="${websocket-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.websocket-api"
manifest="${tomcat.manifests}/websocket-api.jar.manifest"
addOSGi="true" />
<!-- JASPIC API JAR File -->
<jarIt jarfile="${jaspic-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.jaspic-api"
manifest="${tomcat.manifests}/jaspic-api.jar.manifest"
addOSGi="true" />
<!-- WebSocket implementation JAR File -->
<jarIt jarfile="${tomcat-websocket.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
addOSGi="true" />
<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap.jar}"
filesDir="${tomcat.classes}"
filesId="files.bootstrap"
manifest="${tomcat.manifests}/bootstrap.jar.manifest" />
<!-- Tomcat-juli JAR File -->
<jarIt jarfile="${tomcat-juli.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-juli"
addOSGi="true" />
<!-- Catalina Main JAR File -->
<jarIt jarfile="${catalina.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina"
addOSGi="true" />
<!-- Catalina GroupCom/Tribes JAR File -->
<jarIt jarfile="${catalina-tribes.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-tribes"
addOSGi="true" />
<!-- Server-Side Includes (SSI) -->
<jarIt jarfile="${catalina-ssi.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-ssi"
addOSGi="true" />
<!-- Catalina Cluster/HA JAR File -->
<jarIt jarfile="${catalina-ha.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-ha"
addOSGi="true" />
<!-- Catalina Ant Tasks JAR File -->
<jarIt jarfile="${catalina-ant.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-ant" />
<!-- Catalina Storeconfig JAR File -->
<jarIt jarfile="${catalina-storeconfig.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-storeconfig"
addOSGi="true" />
<!-- Tomcat API JAR File -->
<jarIt jarfile="${tomcat-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-api"
addOSGi="true" />
<!-- Tomcat Util JAR File -->
<jarIt jarfile="${tomcat-util.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-util"
addOSGi="true" />
<!-- Tomcat Util Scan JAR File -->
<jarIt jarfile="${tomcat-util-scan.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-util-scan"
addOSGi="true" />
<!-- Protocol handlers - Coyote -->
<jarIt jarfile="${tomcat-coyote.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-coyote"
addOSGi="true" />
<jarIt jarfile="${tomcat-jni.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-jni"
addOSGi="true" />
<!-- Jasper Implementation JAR File -->
<jarIt jarfile="${jasper.jar}"
filesDir="${tomcat.classes}"
filesId="files.jasper"
meta-inf="${tomcat.manifests}/jasper.jar"
addOSGi="true" />
<!-- Jasper EL Implementation JAR File -->
<jarIt jarfile="${jasper-el.jar}"
filesDir="${tomcat.classes}"
filesId="files.jasper-el"
meta-inf="${tomcat.manifests}/jasper-el.jar"
addOSGi="true" />
<!-- Re-packaged Apache Commons DBCP 2-->
<jarIt jarfile="${tomcat-dbcp.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-dbcp"
addOSGi="true" />
<!-- i18n JARs -->
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-cs.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_cs.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-de.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_de.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-es.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_es.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-fr.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_fr.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-ja.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_ja.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-ko.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_ko.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-pt-BR.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_pt_BR.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-ru.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_ru.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-zh-CN.jar"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="**/LocalStrings_zh_CN.properties" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
</target>
<target name="build-docs" depends="compile-prepare" description="Builds all documentation from XML sources">
<copy todir="${tomcat.build}/webapps">
<fileset dir="webapps">
<include name="docs/images/**"/>
<include name="docs/WEB-INF/**"/>
<include name="docs/appdev/*.txt"/>
<include name="docs/appdev/sample/**"/>
</fileset>
<fileset dir="webapps">
<include name="docs/architecture/**"/>
<exclude name="docs/architecture/*.xml"/>
</fileset>
</copy>
<copy todir="${tomcat.build}/webapps" encoding="UTF-8">
<filterset refid="version.filters"/>
<fileset dir="webapps">
<include name="docs/**/*.html"/>
</fileset>
</copy>
<copy todir="${tomcat.build}/webapps/docs" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir=".">
<include name="BUILDING.txt"/>
<include name="RUNNING.txt"/>
</fileset>
</copy>
<copy tofile="${tomcat.build}/webapps/docs/RELEASE-NOTES.txt" file="RELEASE-NOTES" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<copy tofile="${tomcat.build}/webapps/docs/mbeans-descriptors.dtd"
file="java/org/apache/tomcat/util/modeler/mbeans-descriptors.dtd" />
<copy tofile="${tomcat.build}/webapps/docs/appdev/sample/build.xml"
file="webapps/docs/appdev/build.xml.txt"/>
<mkdir dir="${tomcat.build}/webapps/docs/funcspecs" />
<!-- XSL processing -->
<xslt basedir="webapps/docs"
destdir="${tomcat.build}/webapps/docs"
extension=".html"
style="webapps/docs/tomcat-docs.xsl"
filenameparameter="filename"
excludes="build.xml project.xml"
includes="*.xml">
<param name="sitedir" expression="tomcat-${version.major.minor}-doc/"/>
<param name="subdir" expression=""/>
<param name="relative-path" expression="."/>
<param name="version" expression="${version}"/>
<param name="majorversion" expression="${version.major}"/>
<param name="majorminorversion" expression="${version.major.minor}"/>
<param name="build-date" expression="${today}"/>
<param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/appdev"
destdir="${tomcat.build}/webapps/docs/appdev"
extension=".html"
style="webapps/docs/tomcat-docs.xsl"
filenameparameter="filename"
excludes="project.xml"
includes="*.xml">
<param name="sitedir" expression="tomcat-${version.major.minor}-doc/"/>
<param name="subdir" expression="appdev/"/>
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="majorversion" expression="${version.major}"/>
<param name="majorminorversion" expression="${version.major.minor}"/>
<param name="build-date" expression="${today}"/>
<param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/funcspecs"
destdir="${tomcat.build}/webapps/docs/funcspecs"
extension=".html"
style="webapps/docs/tomcat-docs.xsl"
filenameparameter="filename"
excludes="project.xml"
includes="*.xml">
<param name="sitedir" expression="tomcat-${version.major.minor}-doc/"/>
<param name="subdir" expression="funcspecs/"/>
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="majorversion" expression="${version.major}"/>
<param name="majorminorversion" expression="${version.major.minor}"/>
<param name="build-date" expression="${today}"/>
<param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/config"
destdir="${tomcat.build}/webapps/docs/config"
extension=".html"
style="webapps/docs/tomcat-docs.xsl"
filenameparameter="filename"
excludes="project.xml"
includes="*.xml">
<param name="sitedir" expression="tomcat-${version.major.minor}-doc/"/>
<param name="subdir" expression="config/"/>
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="majorversion" expression="${version.major}"/>
<param name="majorminorversion" expression="${version.major.minor}"/>
<param name="build-date" expression="${today}"/>
<param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/architecture"
destdir="${tomcat.build}/webapps/docs/architecture"
extension=".html"
style="webapps/docs/tomcat-docs.xsl"
filenameparameter="filename"
excludes="project.xml"
includes="*.xml">
<param name="sitedir" expression="tomcat-${version.major.minor}-doc/"/>
<param name="subdir" expression="architecture/"/>
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="majorversion" expression="${version.major}"/>
<param name="majorminorversion" expression="${version.major.minor}"/>
<param name="build-date" expression="${today}"/>
<param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/tribes"
destdir="${tomcat.build}/webapps/docs/tribes"
extension=".html"
style="webapps/docs/tomcat-docs.xsl"
filenameparameter="filename"
excludes="project.xml"
includes="*.xml">
<param name="sitedir" expression="tomcat-${version.major.minor}-doc/"/>
<param name="subdir" expression="tribes/"/>
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="majorversion" expression="${version.major}"/>
<param name="majorminorversion" expression="${version.major.minor}"/>
<param name="build-date" expression="${today}"/>
<param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
</target>
<target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples"
description="Default. Builds a working Tomcat instance">
<copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
<!-- Copy scripts -->
<copy todir="${tomcat.build}/bin">
<fileset dir="bin">
<exclude name="**/*.launch"/>
<exclude name="**/*.sh"/>
<exclude name="**/*.bat"/>
</fileset>
</copy>
<copy todir="${tomcat.build}/bin" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir="bin">
<include name="**/*.sh"/>
<include name="**/*.bat"/>
</fileset>
</copy>
<!-- Copy doesn't retain permissions -->
<chmod dir="${tomcat.build}/bin" includes="*.sh" perm="+x"/>
<!-- Copy static resource files -->
<copy todir="${tomcat.build}/conf" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir="conf">
<include name="**/*.policy"/>
<include name="**/*.xml"/>
<include name="**/*.xsd"/>
<include name="**/*.properties"/>
</fileset>
</copy>
<!-- Copy other regular webapps -->
<copy todir="${tomcat.build}/webapps">
<fileset dir="webapps">
<include name="ROOT/**"/>
<exclude name="ROOT/index.jsp"/>
<include name="examples/**"/>
<include name="manager/**"/>
<include name="host-manager/**"/>
</fileset>
</copy>
<copy todir="${tomcat.build}/webapps" encoding="UTF-8">
<filterset refid="version.filters" />
<fileset dir="webapps">
<include name="ROOT/index.jsp"/>
</fileset>
</copy>
<copy tofile="${tomcat.build}/webapps/ROOT/RELEASE-NOTES.txt" file="RELEASE-NOTES" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<!-- Delete all other versions of Eclipse JDT Compiler and copy the current one -->
<local name="jdt.jar.filename" />
<basename property="jdt.jar.filename" file="${jdt.jar}"/>
<delete verbose="true">
<fileset dir="${tomcat.build}/lib">
<include name="ecj-*.jar"/>
<exclude name="${jdt.jar.filename}"/>
</fileset>
</delete>
<copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
<!-- Add sources for examples -->
<antcall target="examples-sources" />
</target>
<target name="compile-webapp-examples" >
<!-- Build classes for examples webapp -->
<mkdir dir="${tomcat.build}/webapps/examples/WEB-INF/classes"/>
<javac srcdir="webapps/examples/WEB-INF/classes"
destdir="${tomcat.build}/webapps/examples/WEB-INF/classes"
debug="${compile.debug}" deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
release="${compile.release}"
classpath="${tomcat.classes}"
encoding="ISO-8859-1"
includeantruntime="false">
</javac>
<mkdir dir="${tomcat.build}/webapps/examples/jsp/plugin/applet"/>
<javac srcdir="webapps/examples/jsp/plugin/applet"
destdir="${tomcat.build}/webapps/examples/jsp/plugin/applet"
debug="${compile.debug}" deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
release="${compile.release}"
classpath="${tomcat.classes}"
encoding="ISO-8859-1"
includeantruntime="false">
</javac>
<!-- Convert the message files of the examples webapp from UTF-8 to ASCII.
This can be removed after upgrading to Java 9+ as the minimum JRE and
specifying the encoding when loading the ResourceBundles -->
<native2ascii src="webapps/examples/WEB-INF/classes"
dest="${tomcat.build}/webapps/examples/WEB-INF/classes"
includes="**/LocalStrings*.properties"
encoding="UTF-8"/>
</target>
<target name="build-tomcat-jdbc" depends="package">
<!-- build the jdbc-pool jar and source jar-->
<echo message="Building Tomcat JDBC pool libraries"/>
<ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
inheritAll="false" target="build">
<property name="tomcat.pool" value="${tomcat.pool}" />
<property name="tomcat.juli.jar" value="${tomcat-juli.jar}" />
<property name="skip.download" value="set"/>
<property name="version" value="${version}"/>
<property name="version.major" value="${version.major}"/>
<property name="version.major.minor" value="${version.major.minor}"/>
</ant>
<copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/>
</target>
<target name="build-tomcat-jdbc-src">
<!-- build the jdbc-pool source jar-->
<echo message="Building Tomcat JDBC pool src JAR"/>
<ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
inheritAll="false" target="build-src">
<property name="tomcat.pool" value="${tomcat.pool}" />
<property name="tomcat.juli.jar" value="${tomcat-juli.jar}" />
<property name="skip.download" value="set"/>
</ant>
</target>
<target name="examples-sources" description="Create examples sources"
unless="examples.sources.skip" >
<taskdef name="txt2html"
classname="org.apache.tomcat.buildutil.Txt2Html"
classpath="${tomcat.classes}" />
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/simpletag">
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples">
<include name="BookBean.java"/>
</fileset>
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/simpletag">
<include name="FindBookSimpleTag.java"/>
<include name="RepeatSimpleTag.java"/>
<include name="HelloWorldSimpleTag.java"/>
</fileset>
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/el">
<include name="Functions.java"/>
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/jspattribute">
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples">
<include name="FooBean.java"/>
</fileset>
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/simpletag">
<include name="ShuffleSimpleTag.java"/>
<include name="TileSimpleTag.java"/>
<include name="HelloWorldSimpleTag.java"/>
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples/jsp/cal">
<fileset dir="webapps/examples/WEB-INF/classes/cal">
<include name="Entries.java"/>
<include name="Entry.java"/>
<include name="JspCalendar.java"/>
<include name="TableBean.java"/>
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsptoserv">
<fileset dir="webapps/examples/WEB-INF/classes">
<include name="ServletToJsp.java"/>
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/el">
<fileset dir="webapps/examples/WEB-INF/classes/examples">
<include name="ValuesTag.java"/>
</fileset>
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples">
<include name="ValuesBean.java"/>
</fileset>
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/el">
<include name="Functions.java"/>
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/misc">
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/simpletag">
<include name="EchoAttributesTag.java"/>
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/tagfiles">
<fileset dir="webapps/examples/WEB-INF/tags">
<include name="**/*.tag" />
</fileset>
</txt2html>
<txt2html todir="${tomcat.build}/webapps/examples">
<fileset dir="webapps/examples">
<include name="**/*.jsp" />
<include name="**/*.jspx" />
<include name="**/*.jspf" />
<exclude name="error/errorpge.jsp"/>
<exclude name="forward/one.jsp"/>
<exclude name="include/foo.jsp"/>
<exclude name="jsptoserv/hello.jsp"/>
<exclude name="security/protected/error.jsp"/>
<exclude name="security/protected/index.jsp"/>
<exclude name="security/protected/login.jsp"/>
</fileset>
</txt2html>
</target>
<target name="embed-jars" description="Create experimental embedded jars"
depends="build-manifests,build-bnd,compile" >
<mkdir dir="${tomcat.embed}" />
<copy file="${basedir}/LICENSE" todir="${tomcat.embed}" />
<copy file="${basedir}/NOTICE" todir="${tomcat.embed}" />
<copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}"
failonerror="false"/>
<copy file="${jdt.jar}" todir="${tomcat.embed}" />
<copy file="${annotations-api.jar}" todir="${tomcat.embed}" />
<!-- Note the meta-inf below will work as long as there is only one JAR
that needs to add entries. If there is more than one a more complex
solution will be required. -->
<jarIt jarfile="${tomcat-embed-core.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-core"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license"
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-core"
graalFiles="res/graal/tomcat-embed-core/native-image"/>
<jarIt jarfile="${tomcat-embed-jasper.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-jasper"
meta-inf="${tomcat.manifests}/jasper.jar"
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-jasper"
graalFiles="res/graal/tomcat-embed-jasper/native-image"/>
<jarIt jarfile="${tomcat-embed-el.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-el"
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-el"
graalFiles="res/graal/tomcat-embed-el/native-image"/>
<jarIt jarfile="${tomcat-embed-websocket.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-websocket"
graalFiles="res/graal/tomcat-embed-websocket/native-image"/>
</target>
<target name="embed-sources"
description="Create source jars for embedded jars"
depends="build-manifests,package-src-jar" >
<mkdir dir="${tomcat.embed.sources}" />
<jarIt jarfile="${tomcat-embed-core-sources.jar}"
filesDir="java"
filesId="files.tomcat-embed-core"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license"/>
<jarIt jarfile="${tomcat-embed-jasper-sources.jar}"
filesDir="java"
filesId="files.tomcat-embed-jasper"/>
<jarIt jarfile="${tomcat-embed-el-sources.jar}"
filesDir="java"
filesId="files.tomcat-embed-el"/>
<jarIt jarfile="${tomcat-embed-websocket-sources.jar}"
filesDir="java"
filesId="files.tomcat-embed-websocket"/>
<copy file="${tomcat-dbcp-src.jar}" todir="${tomcat.embed.sources}" />
<!--No sources for ${jdt.jar} -->
</target>
<target name="embed"
description="Creates the experimental embedded release"
depends="embed-jars,embed-sources" >
<fixcrlf srcdir="${tomcat.embed}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<zip destfile="${tomcat.embed}/${final.name}-embed.zip">
<fileset dir="${tomcat.embed}">
<include name="**" />
<exclude name="*.asc" />
<exclude name="*.sha512" />
<exclude name="*.zip" />
<exclude name="*.tar.gz" />
</fileset>
</zip>
<hashAndSign file="${tomcat.embed}/${final.name}-embed.zip" />
<fixcrlf srcdir="${tomcat.embed}" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.embed}/${final.name}-embed.tar.gz">
<tarfileset dir="${tomcat.embed}" prefix="${final.name}-embed">
<include name="**" />
<exclude name="*.asc" />
<exclude name="*.sha512" />
<exclude name="*.zip" />
<exclude name="*.tar.gz" />
</tarfileset>
</tar>
<hashAndSign file="${tomcat.embed}/${final.name}-embed.tar.gz" />
</target>
<target name="test-compile" depends="compile,download-test-compile,compile-webapp-examples" >
<mkdir dir="${test.classes}"/>
<!-- Compile -->
<javac srcdir="test" destdir="${test.classes}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
release="${compile.release}"
encoding="ISO-8859-1"
includeantruntime="true">
<classpath refid="tomcat.test.classpath" />
<include name="org/apache/**" />
<include name="jakarta/**" />
<include name="javax/**" />
<include name="util/**" />
<!-- Exclude these by default as Gump can't run them because the -->
<!-- classes on which they depend are not in any output JAR. -->
<exclude name="org/apache/tomcat/buildutil/**"/>
</javac>
<copy todir="${test.classes}">
<fileset dir="test">
<include name="META-INF/**"/>
<include name="**/service-config.txt"/>
<include name="**/logging-non-rotatable.properties"/>
</fileset>
</copy>
</target>
<!-- Default JUnit log output formatter -->
<property name="junit.formatter.type" value="plain" />
<property name="junit.formatter.usefile" value="true" />
<property name="junit.formatter.extension" value=".txt" />
<target name="test" description="Runs the JUnit test cases"
depends="test-nio,test-nio2,test-apr,cobertura-report,test-status" />
<target name="test-only" description="Runs the JUnit test cases without additional processing"
depends="test-only-nio,test-only-nio2,test-only-apr,test-status" />
<target name="test-status"
description="Analyses logs directory and reports on skipped tests, test failures and test errors">
<fileset id="test.result.skippedtests" dir="${test.reports}" includes="*.txt">
<not>
<contains text="Skipped: 0" />
</not>
</fileset>
<fileset id="test.result.failedtests" dir="${test.reports}" includes="*.txt">
<not>
<contains text="Failures: 0, Errors: 0" />
</not>
</fileset>
<concat>
<header>Testsuites with skipped tests:${line.separator}</header>
<string>${toString:test.result.skippedtests}</string>
<filterchain>
<tokenfilter delimOutput="${line.separator}">
<stringtokenizer delims=";"/>
</tokenfilter>
</filterchain>
</concat>
<concat>
<header>Testsuites with failed tests:${line.separator}</header>
<string>${toString:test.result.failedtests}</string>
<filterchain>
<tokenfilter delimOutput="${line.separator}">
<stringtokenizer delims=";"/>
</tokenfilter>
</filterchain>
</concat>
<fail if="test.result.error" message='Some tests completed with an Error. See ${tomcat.build}/logs for details, search for "ERROR".' />
<fail if="test.result.failure" message='Some tests completed with a Failure. See ${tomcat.build}/logs for details, search for "FAILED".' />
</target>
<target name="test-nio" description="Runs the JUnit test cases for NIO. Does not stop on errors."
depends="test-compile,deploy,cobertura-instrument,test-openssl-exists" if="${execute.test.nio}">
<runtests protocol="org.apache.coyote.http11.Http11NioProtocol"
extension=".NIO" />
</target>
<target name="test-only-nio" description="Runs the JUnit test cases for NIO. Does not stop on errors."
depends="cobertura-disabled,test-openssl-exists" if="${execute.test.nio}">
<runtests protocol="org.apache.coyote.http11.Http11NioProtocol"
extension=".NIO" />
</target>
<target name="test-nio2" description="Runs the JUnit test cases for NIO2. Does not stop on errors."
depends="test-compile,deploy,cobertura-instrument,test-openssl-exists" if="${execute.test.nio2}">
<runtests protocol="org.apache.coyote.http11.Http11Nio2Protocol"
extension=".NIO2" />
</target>
<target name="test-only-nio2" description="Runs the JUnit test cases for NIO2. Does not stop on errors."
depends="cobertura-disabled,test-openssl-exists" if="${execute.test.nio2}">
<runtests protocol="org.apache.coyote.http11.Http11Nio2Protocol"
extension=".NIO2" />
</target>
<target name="test-apr" description="Runs the JUnit test cases for APR. Does not stop on errors."
depends="test-compile,deploy,test-apr-exists,cobertura-instrument,test-openssl-exists"
if="${apr.exists}">
<runtests protocol="org.apache.coyote.http11.Http11AprProtocol"
extension=".APR" />
</target>
<target name="test-only-apr" description="Runs the JUnit test cases for APR. Does not stop on errors."
depends="cobertura-disabled,test-openssl-exists" if="${execute.test.apr}">
<runtests protocol="org.apache.coyote.http11.Http11AprProtocol"
extension=".APR" />
</target>
<target name="test-apr-exists" description="Checks for APR lib"
if="${execute.test.apr}">
<available file="${test.apr.loc}" property="apr.exists" />
</target>
<target name="test-openssl-exists" description="Checks for the OpenSSL binary">
<property environment="env" />
<condition property="test.openssl.exists">
<or>
<and>
<length string="${test.openssl.path}" trim="true" length="0" when="gt"/>
<available file="${test.openssl.path}" property="test.openssl.exists"/>
</and>
<and>
<length string="${test.openssl.path}" trim="true" length="0" when="eq"/>
<available file="openssl" filepath="${env.PATH}" property="test.openssl.exists"/>
</and>
</or>
</condition>
</target>
<macrodef name="runtests"
description="Runs the unit tests using the specified connector.
Does not stop on errors, but sets 'test.result.error' and 'test.result.failure' properties.">
<attribute name="protocol"
description="The class name for the connector protocol"/>
<attribute name="extension"
description="The extension to use to distinguish the output"/>
<sequential>
<mkdir dir="${test.reports}" />
<junit printsummary="yes" fork="yes" dir="." showoutput="${test.verbose}"
errorproperty="test.result.error"
failureproperty="test.result.failure"
haltonfailure="${test.haltonfailure}"
threads="${test.threads}">
<jvmarg value="${test.jvmarg.egd}"/>
<jvmarg value="-Dfile.encoding=UTF-8"/>
<jvmarg value="-Djava.library.path=${test.apr.loc}"/>
<jvmarg value="${test.formatter}"/>
<jvmarg value="-Djava.net.preferIPv4Stack=${java.net.preferIPv4Stack}"/>
<jvmarg value="-Dorg.apache.tomcat.util.net.NioSelectorShared=${org.apache.tomcat.util.net.NioSelectorShared}"/>
<!-- Java 9 -->
<jvmarg value="${java9.test.option.1}"/>
<jvmarg value="${java9.test.option.2}"/>
<jvmarg value="${java9.test.option.3}"/>
<classpath refid="tomcat.test.run.classpath" />
<sysproperty key="tomcat.test.temp" value="${test.temp}" />
<sysproperty key="tomcat.test.basedir" value="${test.basedir}" />
<sysproperty key="tomcat.test.tomcatbuild" value="${tomcat.build}" />
<sysproperty key="tomcat.test.protocol" value="@{protocol}" />
<sysproperty key="tomcat.test.accesslog" value="${test.accesslog}" />
<sysproperty key="tomcat.test.reports" value="${test.reports}" />
<sysproperty key="tomcat.test.openssl.path" value="${test.openssl.path}" />
<sysproperty key="tomcat.test.openssl.unimplemented" value="${test.openssl.unimplemented}" />
<sysproperty key="tomcat.test.relaxTiming" value="${test.relaxTiming}" />
<sysproperty key="tomcat.test.sslImplementation" value="${test.sslImplementation}" />
<sysproperty key="tomcat.test.http2.loopCount" value="${test.http2.loopCount}" />
<!-- File for Cobertura to write coverage results to -->
<sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}" />
<formatter type="${junit.formatter.type}"
usefile="${junit.formatter.usefile}"
extension="@{extension}${junit.formatter.extension}" />
<!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
<test todir="${test.reports}" name="${test.entry}"
if="test.entry" unless="test.entry.methods"
/>
<test todir="${test.reports}" name="${test.entry}" methods="${test.entry.methods}"
if="test.entry.methods"
/>
<batchtest todir="${test.reports}" unless="test.entry">
<!-- Include all by default -->
<fileset dir="test" includes="${test.name}">
<!-- Exclude helper classes -->
<exclude name="**/Tester*.java" />
<!-- Exclude the tests known to fail -->
<exclude name="org/apache/catalina/tribes/test/**" />
<!-- Exclude the OpenSSL tests unless OpenSSL is available -->
<exclude name="org/apache/tomcat/util/net/openssl/ciphers/**" unless="${test.openssl.exists}" />
<!-- Exclude performance tests. E.g. on systems with slow/inconsistent timing -->
<exclude name="**/*Performance.java" if="${test.excludePerformance}" />
<!-- Exclude tests that Gump can't compile -->
<exclude name="org/apache/tomcat/buildutil/**" />
<!-- Exclude a configurable list of tests -->
<exclude name="${test.exclude}" />
</fileset>
</batchtest>
</junit>
</sequential>
</macrodef>
<target name="cobertura-init">
<condition property="cobertura.enabled" value="true">
<and>
<istrue value="${test.cobertura}"/>
<equals arg1="1" arg2="${test.threads}"/>
</and>
</condition>
<condition property="cobertura.disabled" value="true">
<and>
<istrue value="${test.cobertura}"/>
<not>
<equals arg1="1" arg2="${test.threads}"/>
</not>
</and>
</condition>
</target>
<target name="cobertura-disabled" unless="${cobertura.enabled}"
depends="cobertura-init">
<!-- Define classpath used to run tests when Cobertura is turned off. -->
<path id="tomcat.test.run.classpath">
<path refid="tomcat.test.classpath" />
</path>
</target>
<target name="cobertura-disabled-log" if="${cobertura.disabled}"
depends="cobertura-init">
<echo message="Code coverage disabled because test.threads is greater than 1"/>
</target>
<target name="cobertura-instrument"
depends="compile,download-cobertura,cobertura-disabled,cobertura-disabled-log"
if="${cobertura.enabled}"
description="Adds Cobertura instrumentation to the compiled bytecode">
<path id="cobertura.classpath">
<fileset dir="${cobertura.home}">
<include name="cobertura-${cobertura.version}.jar" />
<include name="lib/**/*.jar" />
<exclude name="lib/**/jetty*.jar" />
<exclude name="lib/**/servlet-api*.jar" />
</fileset>
<pathelement path="res/cobertura"/>
</path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
<cobertura-instrument datafile="${cobertura.datafile}"
todir="${tomcat.classes.cobertura}">
<fileset dir="${tomcat.classes}">
<include name="**/*.class"/>
<exclude name="**/ClassLoaderLogManager.class"/>
<exclude name="**/ClassLoaderLogManager*.class"/>
<exclude name="**/FileHandler.class"/>
<exclude name="**/AsyncFileHandler.class"/>
<exclude name="**/AsyncFileHandler*.class"/>
<exclude name="**/OneLineFormatter.class"/>
<exclude name="**/OneLineFormatter*.class"/>
<exclude name="**/DateFormatCache.class"/>
<exclude name="**/DateFormatCache*.class"/>
</fileset>
<auxClasspath path="${jdt.jar}" />
</cobertura-instrument>
<!-- Define classpath used to run tests -->
<!-- The Cobertura instrumented classes must appear first on the classpath -->
<path id="tomcat.test.run.classpath">
<path location="${tomcat.classes.cobertura}" />
<path refid="tomcat.test.classpath" />
<path refid="cobertura.classpath"/>
</path>
</target>
<target name="cobertura-report" if="${cobertura.enabled}"
depends="test-nio,test-nio2,test-apr"
description="Creates report from gathered Cobertura results">
<cobertura-report srcdir="${basedir}/java" destdir="${cobertura.out}"
datafile="${cobertura.datafile}"
format="${cobertura.report.format}"/>
</target>
<target name="findbugs"
if="${execute.findbugs}"
depends="compile,download-findbugs">
<path id="findbugs.classpath">
<fileset file="${findbugs.jar}" />
</path>
<taskdef classpathref="findbugs.classpath" name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<mkdir dir="${findbugs.out}" />
<findbugs home="${findbugs.home}"
output="${findbugs.report.format}"
outputFile="${findbugs.out}/findbugs-report.${findbugs.report.format}"
reportLevel="${findbugs.report.level}"
excludeFilter="res/findbugs/filter-false-positives.xml" >
<sourcePath path="${basedir}/java" />
<class location="${tomcat.classes}" />
<class location="${test.classes}" />
<auxClasspath>
<fileset file="${jdt.jar}" />
<fileset file="${ant.core.lib}" />
</auxClasspath>
</findbugs>
</target>
<target name="dist-prepare" depends="download-dist">
<mkdir dir="${tomcat.dist}"/>
<mkdir dir="${tomcat.dist}/bin"/>
<mkdir dir="${tomcat.dist}/conf"/>
<mkdir dir="${tomcat.dist}/lib"/>
<mkdir dir="${tomcat.dist}/logs"/>
<mkdir dir="${tomcat.dist}/temp"/>
<mkdir dir="${tomcat.dist}/webapps"/>
<mkdir dir="${tomcat.dist}/work"/>
<mkdir dir="${tomcat.release}/v${version}/bin" />
<mkdir dir="${tomcat.release}/v${version}/src" />
</target>
<target name="dist-static" depends="dist-prepare, deploy, embed">
<!-- Copy the top-level documentation files -->
<copy todir="${tomcat.dist}" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir=".">
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="README.md"/>
<include name="BUILDING.txt" />
<include name="CONTRIBUTING.md"/>
</fileset>
</copy>
<!-- Copy the contents of each "build" directory -->
<copy todir="${tomcat.dist}/bin">
<fileset dir="${tomcat.build}/bin">
</fileset>
</copy>
<copy todir="${tomcat.dist}/lib">
<fileset dir="${tomcat.build}/lib" />
</copy>
<copy todir="${tomcat.dist}/conf">
<fileset dir="${tomcat.build}/conf">
</fileset>
</copy>
<copy todir="${tomcat.dist}/webapps">
<fileset dir="${tomcat.build}/webapps">
<exclude name="**/ROOT/WEB-INF/classes/**" />
<exclude name="**/WEB-INF/src/**" />
</fileset>
</copy>
<touch file="${tomcat.dist}/temp/safeToDelete.tmp" />
<!-- Correct permissions and line endings on "bin" scripts -->
<fixcrlf srcdir="${tomcat.dist}/bin" includes="*.sh" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<fixcrlf srcdir="${tomcat.dist}/bin" includes="*.bat" eol="crlf" encoding="ISO-8859-1" fixlast="false" />
<chmod dir="${tomcat.dist}/bin" includes="*.sh" perm="+x"/>
<!-- Windows binaries -->
<!-- 32 bit -->
<copy file="${commons-daemon.home}/windows/prunsrv.exe"
tofile="${tomcat.dist}/bin/tomcat${version.major}.exe" />
<copy file="${commons-daemon.home}/windows/prunmgr.exe"
tofile="${tomcat.dist}/bin/tomcat${version.major}w.exe" />
<!-- 64 bit amd -->
<copy file="${commons-daemon.home}/windows/amd64/prunsrv.exe"
tofile="${tomcat.dist}/bin/x64/tomcat${version.major}.exe" />
<!-- tc native -->
<copy todir="${tomcat.dist}/bin">
<fileset dir="${tomcat-native.home}/bin">
<include name="*.dll"/>
<include name="**/*.dll"/>
</fileset>
</copy>
<!-- Source bundles for native components -->
<copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz"
file="${tomcat-native.tar.gz}" />
<copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz"
file="${commons-daemon.native.src.tgz}" />
<!-- platform README files -->
<echo append="false" file="${tomcat.dist}/bin/x64/README">
Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
</echo>
</target>
<target name="javadoc" depends="dist-source"
description="Create the Tomcat javadoc" >
<javadoc packagenames="jakarta.annotation.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/annotationapi"
version="true"
windowtitle="Common Annotations ${annotation.spec.version} API Documentation - Apache Tomcat ${version}"
doctitle="Common Annotations ${annotation.spec.version} API - Apache Tomcat ${version}"
header="&lt;b&gt;Common Annotations ${annotation.spec.version} - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="jakarta.servlet.*"
excludepackagenames="jakarta.servlet.jsp.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/servletapi"
version="true"
windowtitle="Servlet {servlet.spec.version} API Documentation - Apache Tomcat ${version}"
doctitle="Servlet {servlet.spec.version} API - Apache Tomcat ${version}"
header="&lt;b&gt;Servlet {servlet.spec.version} - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="jakarta.servlet.jsp.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/jspapi"
version="true"
windowtitle="JSP ${jsp.spec.version} API Documentation - Apache Tomcat ${version}"
doctitle="JSP ${jsp.spec.version} API - Apache Tomcat ${version}"
header="&lt;b&gt;JSP ${jsp.spec.version} - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="jakarta.el.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/elapi"
version="true"
windowtitle="EL ${el.spec.version} API Documentation - Apache Tomcat ${version}"
doctitle="EL ${el.spec.version} API - Apache Tomcat ${version}"
header="&lt;b&gt;EL ${el.spec.version} - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="jakarta.websocket.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/websocketapi"
version="true"
windowtitle="WebSocket ${websocket.spec.version} API Documentation - Apache Tomcat ${version}"
doctitle="WebSocket ${websocket.spec.version} API - Apache Tomcat ${version}"
header="&lt;b&gt;WebSocket ${websocket.spec.version} - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="jakarta.security.auth.message.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/jaspicapi"
version="true"
windowtitle="JASPIC ${jaspic.spec.version} API Documentation - Apache Tomcat ${version}"
doctitle="JASPIC ${jaspic.spec.version} API - Apache Tomcat ${version}"
header="&lt;b&gt;JASPIC ${jaspic.spec.version} - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="org.apache.*"
destdir="${tomcat.dist}/webapps/docs/api"
version="true"
windowtitle="Apache Tomcat ${version} API Documentation"
doctitle="Apache Tomcat ${version} API"
header="&lt;b&gt;Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
<link href="../annotationapi"/>
<link href="../servletapi"/>
<link href="../jspapi"/>
<link href="../elapi"/>
<link href="../websocketapi"/>
<link href="../jaspicapi"/>
<link href="https://docs.oracle.com/javase/8/docs/api/"/>
<link href="https://javaee.github.io/javaee-spec/javadocs/"/>
<packageset dir="${tomcat.dist}/src/java/">
<include name="org/**"/>
<exclude name="org/apache/el/parser/**"/>
<exclude name="org/apache/tomcat/util/json/**"/>
</packageset>
<!--jdbc-pool src files for javadoc-->
<packageset dir="${tomcat.dist}/src/modules/jdbc-pool/src/main/java"/>
</javadoc>
</target>
<target name="dist-deployer" depends="dist-prepare,deploy"
description="Create the Tomcat deployer binary">
<!-- Servlet and JSP -->
<copy todir="${tomcat.deployer}/lib">
<fileset dir="${tomcat.build}/lib">
<include name="catalina-ant.jar"/>
<include name="el-api.jar"/>
<include name="jsp-api.jar"/>
<include name="jasper.jar"/>
<include name="jasper-el.jar"/>
<include name="jaspic-api.jar"/>
<include name="servlet-api.jar"/>
<include name="websocket-api.jar"/>
<include name="tomcat-websocket.jar"/>
<include name="tomcat-coyote.jar"/>
<include name="tomcat-util.jar"/>
<include name="tomcat-util-scan.jar"/>
</fileset>
<fileset dir="${tomcat.build}/bin">
<include name="tomcat-juli.jar"/>
</fileset>
</copy>
<!-- Digester and dependencies -->
<jar jarfile="${tomcat.deployer}/lib/catalina-deployer.jar">
<fileset dir="${tomcat.classes}">
<include name="org/apache/catalina/startup/DigesterFactory.class" />
<include name="org/apache/catalina/util/SchemaResolver.class" />
<include name="org/apache/catalina/util/StringManager.class" />
<include name="org/apache/tomcat/util/*" />
<include name="org/apache/tomcat/util/digester/**" />
<exclude name="org/apache/tomcat/util/bcel" />
<exclude name="org/apache/tomcat/util/buf" />
<exclude name="org/apache/tomcat/util/codec" />
<exclude name="org/apache/tomcat/util/collections" />
<exclude name="org/apache/tomcat/util/compat" />
<exclude name="org/apache/tomcat/util/descriptor" />
<exclude name="org/apache/tomcat/util/file" />
<exclude name="org/apache/tomcat/util/http" />
<exclude name="org/apache/tomcat/util/log" />
<exclude name="org/apache/tomcat/util/modeler" />
<exclude name="org/apache/tomcat/util/net" />
<exclude name="org/apache/tomcat/util/res" />
<exclude name="org/apache/tomcat/util/scan" />
<exclude name="org/apache/tomcat/util/security" />
<exclude name="org/apache/tomcat/util/threads" />
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
</jar>
<!-- Main build script -->
<copy todir="${tomcat.deployer}">
<fileset dir="${basedir}/res/deployer" />
</copy>
<!-- Copy deployer documentation -->
<copy todir="${tomcat.deployer}">
<fileset dir="${tomcat.build}/webapps/docs">
<include name="images/asf-logo.svg" />
<include name="images/tomcat.png" />
<include name="images/docs-stylesheet.css" />
</fileset>
</copy>
<copy tofile="${tomcat.deployer}/deployer-howto.html"
file="${tomcat.build}/webapps/docs/deployer-howto.html"/>
</target>
<target name="dist-source" depends="compile-prepare">
<mkdir dir="${tomcat.dist}/src"/>
<!-- Tomcat source -->
<copy todir="${tomcat.dist}/src">
<fileset dir="${basedir}" defaultexcludes="true">
<not>
<or>
<filename name="**/.settings/**" />
<filename name="**/.classpath"/>
<filename name="**/.checkstyle"/>
<filename name="**/.project"/>
<filename name="**/nbproject/**"/>
<filename name="**/output/**"/>
<!-- Commented out, because
test/webapp-virtual-library and
test/webapp-virtual-webapp use it:
<filename name="**/target/**"/>
-->
<filename name="**/build.properties"/>
<filename name="**/mvn.properties"/>
<and>
<!-- Don't exclude the ide support sample files for idea -->
<filename name="**/*.iml" />
<not>
<filename name="res/ide-support/idea/**" />
</not>
</and>
<filename name="**/*.asc" />
<filename name="**/*.tmp" />
<filename name="**/maven-ant-tasks-*.jar" />
<filename name="**/thumbs.db" />
<filename name="**/Thumbs.db" />
<filename name="*.launch"/>
<filename name="bin/setenv.*" />
<filename name="java/org/apache/catalina/startup/catalina.properties" />
<filename name="java/org/apache/el/parser/ELParser.jj" />
<filename name="logs/**" />
<filename name="webapps/docs/jdbc-pool.xml" />
<filename name="work/**" />
<filename name="modules/jdbc-pool/bin/**" />
<filename name="modules/jdbc-pool/includes/**" />
<and>
<!-- exclude all modules except jdbc-pool -->
<filename name="modules/**" />
<not>
<filename name="modules/jdbc-pool/**" />
</not>
</and>
</or>
</not>
</fileset>
</copy>
</target>
<target name="-installer-pre-init">
<property environment="env" />
<condition property="wine.ok">
<or>
<os family="windows" />
<available file="wine" filepath="${env.PATH}" />
<isset property="skip.installer"/>
</or>
</condition>
</target>
<target name="-installer-init" depends="-installer-pre-init" unless="${wine.ok}">
<fail message="The executable wine was not found on the current path.
Wine is required to build the Windows installer when running a release build on
a non-Windows platform. To skip building the Windows installer, set the
skip.installer property in build.properties" />
</target>
<target name="-installer-prep"
unless="skip.installer" depends="dist-static,-installer-init">
<copy todir="${tomcat.dist}">
<fileset dir="res">
<include name="INSTALLLICENSE" />
<include name="*.bmp" />
<include name="*.ico" />
<include name="confinstall/**" />
</fileset>
</copy>
<copy file="${nsis.installoptions.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsexec.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsisdl.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.system.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsdialogs.dll}" todir="${tomcat.dist}" />
<copy file="res/tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi" overwrite="true" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<fixcrlf srcdir="${tomcat.dist}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
</target>
<target name="-installer-create-tempinstaller"
unless="skip.installer" depends="-installer-prep">
<exec dir="${tomcat.dist}" executable="${nsis.exe}" osfamily="windows">
<arg value="/DUNINSTALLONLY" />
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="/V2" />
<arg value="tomcat.nsi" />
</exec>
<exec dir="${tomcat.dist}" executable="wine" osfamily="unix">
<arg value="${nsis.exe}" />
<arg value="/DUNINSTALLONLY" />
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="/V2" />
<arg value="tomcat.nsi" />
</exec>
</target>
<target name="-installer-create-uninstaller"
unless="skip.installer" depends="-installer-create-tempinstaller">
<!-- Execute the temporary installer to create the uninstaller -->
<exec dir="${tomcat.dist}" executable="${tomcat.dist}/tempinstaller.exe"
osfamily="windows" />
<exec dir="${tomcat.dist}" executable="wine" osfamily="unix">
<arg value="${tomcat.dist}/tempinstaller.exe" />
</exec>
</target>
<target name="-installer-sign-uninstaller"
unless="skip.installer" depends="-installer-create-uninstaller"
if="${do.codesigning}">
<taskdef name="signcode"
classname="org.apache.tomcat.buildutil.SignCode"
classpath="${tomcat.classes}" />
<signcode userName="${codesigning.user}" password="${codesigning.pwd}"
partnerCode="${codesigning.partnercode}"
keyStore="${codesigning.keyStore}"
keyStorePassword="${codesigning.keyStorePassword}"
applicationName="Apache Tomcat ${version.major.minor} Uninstaller"
applicationversion="${version}"
signingService="${codesigning.service}">
<fileset dir="${tomcat.dist}">
<filename name="Uninstall.exe"/>
</fileset>
</signcode>
</target>
<target name="-installer" unless="skip.installer"
depends="-installer-sign-uninstaller">
<exec dir="${tomcat.dist}" executable="${nsis.exe}" osfamily="windows">
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="/V2" />
<arg value="tomcat.nsi" />
</exec>
<exec dir="${tomcat.dist}" executable="wine" osfamily="unix">
<arg value="${nsis.exe}" />
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="/V2" />
<arg value="tomcat.nsi" />
</exec>
<move file="${tomcat.dist}/tomcat-installer.exe" tofile="${tomcat.release}/v${version}/bin/${final.name}.exe" />
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}.exe" />
</target>
<target name="installer-sign"
description="Builds and optionally signs the Windows installer"
depends="-installer" if="${do.codesigning}" >
<taskdef name="signcode"
classname="org.apache.tomcat.buildutil.SignCode"
classpath="${tomcat.classes}" />
<signcode userName="${codesigning.user}" password="${codesigning.pwd}"
partnerCode="${codesigning.partnercode}"
keyStore="${codesigning.keyStore}"
keyStorePassword="${codesigning.keyStorePassword}"
applicationName="Apache Tomcat ${version.major.minor}"
applicationversion="${version}"
signingService="${codesigning.service}">
<fileset dir="${tomcat.release}">
<filename name="v${version}/bin/${final.name}.exe"/>
</fileset>
</signcode>
<!-- .exe has changed so need to redo checksums and OpenPGP signature -->
<delete file="${tomcat.release}/v${version}/bin/${final.name}.exe.asc" />
<delete file="${tomcat.release}/v${version}/bin/${final.name}.exe.sha512" />
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}.exe" />
</target>
<target name="release"
depends="clean,release-init,dist-deployer,installer-sign,package-zip,package-winzip,package-tgz,package-deployer-zip,package-deployer-tgz,javadoc,package-docs-tgz,package-src-zip,package-src-tgz,package-src-jar"
description="Create a Tomcat packaged distribution">
<copy file="KEYS"
todir="${tomcat.release}/v${version}"/>
<copy file="RELEASE-NOTES"
todir="${tomcat.release}/v${version}"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<copy file="res/welcome.main.html"
tofile="${tomcat.release}/v${version}/README.html"
encoding="UTF-8">
<filterset refid="version.filters"/>
</copy>
<copy file="res/welcome.bin.html"
tofile="${tomcat.release}/v${version}/bin/README.html"
encoding="UTF-8">
<filterset refid="version.filters"/>
</copy>
<mkdir dir="${tomcat.release}/v${version}/bin/embed" />
<copy todir="${tomcat.release}/v${version}/bin/embed">
<fileset dir="${tomcat.embed}">
<include name="*.zip"/>
<include name="*.tar.gz"/>
<include name="*.asc"/>
<include name="*.sha512"/>
</fileset>
</copy>
</target>
<!-- Sets properties only required for releases -->
<target name="release-init" depends="gpg-init-1,gpg-init-2" />
<target name="gpg-init-1">
<available file="${gpg.exec}" property="gpg.exec.available"/>
</target>
<target name="gpg-init-2" if="${gpg.exec.available}">
<input message="Enter GPG pass-phrase" addproperty="gpg.passphrase" >
<handler type="secure"/>
</input>
</target>
<!-- Packages the core zip distro -->
<target name="package-zip" depends="dist-static">
<fixcrlf srcdir="${tomcat.dist}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.md"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BUILDING.txt" />
<include name="CONTRIBUTING.md"/>
<exclude name="bin/service.bat"/>
<exclude name="bin/x64/"/>
<exclude name="bin/*.exe"/>
<exclude name="bin/*.dll"/>
</zipfileset>
</zip>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}.zip" />
</target>
<!-- Packages the core windows zip distros -->
<target name="package-winzip" depends="dist-static">
<fixcrlf srcdir="${tomcat.dist}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<!-- Windows x86 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-x86.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.md"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BUILDING.txt" />
<include name="CONTRIBUTING.md"/>
<exclude name="bin/x64/"/>
<exclude name="bin/commons-daemon-native.tar.gz"/>
<exclude name="bin/tomcat-native.tar.gz"/>
</zipfileset>
</zip>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}-windows-x86.zip" />
<!-- Windows x64 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-x64.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.md"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BUILDING.txt" />
<include name="CONTRIBUTING.md"/>
<exclude name="bin/x64/"/>
<exclude name="bin/*.dll"/>
<exclude name="bin/tomcat${version.major}.exe"/>
<exclude name="bin/commons-daemon-native.tar.gz"/>
<exclude name="bin/tomcat-native.tar.gz"/>
</zipfileset>
<zipfileset dir="${tomcat.dist}/bin/x64" prefix="${final.name}/bin">
<include name="*.dll"/>
<include name="*.exe"/>
</zipfileset>
</zip>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}-windows-x64.zip" />
</target>
<!-- Packages the deployer distribution in zip format -->
<target name="package-deployer-zip">
<fixcrlf srcdir="${tomcat.dist}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<fixcrlf srcdir="${tomcat.deployer}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.zip">
<zipfileset dir="${tomcat.deployer}" prefix="${final.name}-deployer" includes="**" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="LICENSE" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="NOTICE" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="README.md" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="RELEASE-NOTES" />
</zip>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}-deployer.zip" />
</target>
<!-- Packages the core tar.gz distro -->
<target name="package-tgz" depends="dist-static">
<fixcrlf srcdir="${tomcat.dist}" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}.tar.gz">
<tarfileset dir="${tomcat.dist}" dirmode="700" filemode="600" prefix="${final.name}">
<include name="conf/**" />
</tarfileset>
<tarfileset dir="${tomcat.dist}" dirmode="750" filemode="640" prefix="${final.name}">
<include name="bin/**" />
<include name="lib/**" />
<include name="logs/**" />
<include name="temp/**" />
<include name="webapps/**" />
<include name="work/**" />
<include name="LICENSE" />
<include name="NOTICE" />
<include name="README.md" />
<include name="RELEASE-NOTES" />
<include name="RUNNING.txt" />
<include name="BUILDING.txt" />
<include name="CONTRIBUTING.md"/>
<exclude name="conf/**" />
<exclude name="src/**" />
<exclude name="bin/service.bat"/>
<exclude name="bin/*.sh"/>
<exclude name="bin/x64/"/>
<exclude name="bin/*.exe"/>
<exclude name="bin/*.dll"/>
</tarfileset>
<!-- These need to be added after the bin directory is added else the -->
<!-- bin directory will pick up the wrong permissions. -->
<tarfileset dir="${tomcat.dist}" dirmode="750" filemode="750" prefix="${final.name}">
<include name="bin/*.sh" />
</tarfileset>
</tar>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}.tar.gz" />
</target>
<!-- Packages the deployer Tomcat distro in tar.gz format -->
<target name="package-deployer-tgz">
<fixcrlf srcdir="${tomcat.dist}" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<fixcrlf srcdir="${tomcat.deployer}" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.tar.gz">
<tarfileset dir="${tomcat.dist}" prefix="${final.name}-deployer">
<include name="LICENSE" />
<include name="NOTICE" />
<include name="README.md" />
<include name="RELEASE-NOTES" />
</tarfileset>
<tarfileset dir="${tomcat.deployer}" prefix="${final.name}-deployer">
<include name="**" />
</tarfileset>
</tar>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}-deployer.tar.gz" />
</target>
<!-- Packages the documentation distro in tar.gz format -->
<target name="package-docs-tgz" depends="dist-static">
<fixcrlf srcdir="${tomcat.dist}" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files" />
</fixcrlf>
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}-fulldocs.tar.gz">
<tarfileset dir="${tomcat.dist}" prefix="tomcat-${version.major.minor}-doc">
<include name="LICENSE" />
<include name="NOTICE" />
<include name="README.md" />
</tarfileset>
<tarfileset dir="${tomcat.dist}/webapps/docs" prefix="tomcat-${version.major.minor}-doc">
<include name="**" />
</tarfileset>
</tar>
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}-fulldocs.tar.gz" />
</target>
<!-- Packages the source code distribution in zip format -->
<target name="package-src-zip" depends="dist-source">
<fixcrlf srcdir="${tomcat.dist}/src" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files"/>
<include name="bin/*.bat" />
<include name="bin/*.sh" />
</fixcrlf>
<zip zipfile="${tomcat.release}/v${version}/src/${final-src.name}.zip">
<zipfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />
</zip>
<hashAndSign file="${tomcat.release}/v${version}/src/${final-src.name}.zip" />
</target>
<!-- Packages the source code distribution in tar.gz format -->
<target name="package-src-tgz" depends="dist-source">
<fixcrlf srcdir="${tomcat.dist}/src" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="text.files"/>
<include name="bin/*.bat" />
<include name="bin/*.sh" />
</fixcrlf>
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/src/${final-src.name}.tar.gz">
<tarfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />
</tar>
<hashAndSign file="${tomcat.release}/v${version}/src/${final-src.name}.tar.gz" />
</target>
<!-- Packages the source code in JARs to match the binary JARs -->
<target name="package-src-jar"
depends="build-manifests,build-tomcat-jdbc-src">
<mkdir dir="${tomcat.src.jars}" />
<!-- Common Annotations JAR File -->
<jarIt jarfile="${annotations-api-src.jar}"
filesDir="java"
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
<!-- Servlet Implementation JAR File -->
<jarIt jarfile="${servlet-api-src.jar}"
filesDir="java"
filesId="files.servlet-api"
manifest="${tomcat.manifests}/servlet-api.jar.manifest"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license" />
<!-- JSP Implementation JAR File -->
<jarIt jarfile="${jsp-api-src.jar}"
filesDir="java"
filesId="files.jsp-api"
manifest="${tomcat.manifests}/jsp-api.jar.manifest"
notice="${tomcat.manifests}/jsp-api.jar.notice"
license="${tomcat.manifests}/jsp-api.jar.license" />
<!-- JSP EL Implementation JAR File -->
<jarIt jarfile="${el-api-src.jar}"
filesDir="java"
filesId="files.el-api"
manifest="${tomcat.manifests}/el-api.jar.manifest" />
<!-- WebSocket API JAR File -->
<jarIt jarfile="${websocket-api-src.jar}"
filesDir="java"
filesId="files.websocket-api"
manifest="${tomcat.manifests}/websocket-api.jar.manifest" />
<!-- WebSocket implementation JAR File -->
<jarIt jarfile="${tomcat-websocket-src.jar}"
filesDir="java"
filesId="files.tomcat-websocket" />
<!-- JASPIC API JAR File -->
<jarIt jarfile="${jaspic-api-src.jar}"
filesDir="java"
filesId="files.jaspic-api"
manifest="${tomcat.manifests}/jaspic-api.jar.manifest"
notice="${tomcat.manifests}/jaspic-api.jar.notice"
license="${tomcat.manifests}/jaspic-api.jar.license" />
<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap-src.jar}"
filesDir="java"
filesId="files.bootstrap"
manifest="${tomcat.manifests}/bootstrap.jar.manifest" />
<!-- Tomcat-juli JAR File -->
<jarIt jarfile="${tomcat-juli-src.jar}"
filesDir="java"
filesId="files.tomcat-juli" />
<!-- Catalina Main JAR File -->
<jarIt jarfile="${catalina-src.jar}"
filesDir="java"
filesId="files.catalina" />
<!-- Catalina GroupCom/Tribes JAR File -->
<jarIt jarfile="${catalina-tribes-src.jar}"
filesDir="java"
filesId="files.catalina-tribes" />
<!-- Catalina SSI JAR File -->
<jarIt jarfile="${catalina-ssi-src.jar}"
filesDir="java"
filesId="files.catalina-ssi" />
<!-- Catalina Cluster/HA JAR File -->
<jarIt jarfile="${catalina-ha-src.jar}"
filesDir="java"
filesId="files.catalina-ha" />
<!-- Catalina Ant Tasks JAR File -->
<jarIt jarfile="${catalina-ant-src.jar}"
filesDir="java"
filesId="files.catalina-ant" />
<!-- Catalina Storeconfig JAR File -->
<jarIt jarfile="${catalina-storeconfig-src.jar}"
filesDir="java"
filesId="files.catalina-storeconfig" />
<!-- Tomcat API JAR File -->
<jarIt jarfile="${tomcat-api-src.jar}"
filesDir="java"
filesId="files.tomcat-api" />
<!-- Tomcat Util JAR File -->
<jarIt jarfile="${tomcat-util-src.jar}"
filesDir="java"
filesId="files.tomcat-util" />
<!-- Tomcat Util Scan JAR File -->
<jarIt jarfile="${tomcat-util-scan-src.jar}"
filesDir="java"
filesId="files.tomcat-util-scan" />
<!-- Protocol handlers - Coyote -->
<jarIt jarfile="${tomcat-coyote-src.jar}"
filesDir="java"
filesId="files.tomcat-coyote" />
<!-- JNI -->
<jarIt jarfile="${tomcat-jni-src.jar}"
filesDir="java"
filesId="files.tomcat-jni" />
<!-- Jasper Implementation JAR File -->
<jarIt jarfile="${jasper-src.jar}"
filesDir="java"
filesId="files.jasper" />
<!-- Jasper EL Implementation JAR File -->
<jarIt jarfile="${jasper-el-src.jar}"
filesDir="java"
filesId="files.jasper-el" />
<!-- Repackaged DBCP 2 -->
<jarIt jarfile="${tomcat-dbcp-src.jar}"
filesDir="java"
filesId="files.tomcat-dbcp" />
<!-- jdbc-pool JAR File -->
<copy file="${tomcat-jdbc-src.jar}" todir="${tomcat.src.jars}" />
</target>
<!-- ========================= Cleaning Targets ========================== -->
<target name="clean"
description="Delete the default output folders">
<delete dir="${tomcat.output}" />
<!-- Remove the copied catalina.properties -->
<delete file="java/org/apache/catalina/startup/catalina.properties" />
<ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" inheritAll="false" target="clean">
<property name="tomcat.pool" value="${tomcat.pool}" />
</ant>
<!-- remove jdbc-pool documentation -->
<delete file="webapps/docs/jdbc-pool.xml"/>
</target>
<!-- ================ Download and dependency building =================== -->
<target name="download-validate"
description="Download components necessary to validate source"
if="${execute.validate}">
<antcall target="downloadfile">
<param name="sourcefile" value="${checkstyle.loc}"/>
<param name="destfile" value="${checkstyle.jar}"/>
<param name="destdir" value="${base.path}"/>
<param name="checksum.enabled" value="${checkstyle.checksum.enabled}"/>
<param name="checksum.algorithm" value="${checkstyle.checksum.algorithm}"/>
<param name="checksum.value" value="${checkstyle.checksum.value}"/>
</antcall>
</target>
<target name="download-compile"
description="Download components necessary to compile" >
<!-- Download Commons Daemon -->
<antcall target="downloadgz-2">
<param name="sourcefile.1" value="${commons-daemon.bin.loc.1}"/>
<param name="sourcefile.2" value="${commons-daemon.bin.loc.2}"/>
<param name="destfile" value="${commons-daemon.jar}"/>
<param name="checksum.enabled" value="${commons-daemon.bin.checksum.enabled}"/>
<param name="checksum.algorithm" value="${commons-daemon.bin.checksum.algorithm}"/>
<param name="checksum.value" value="${commons-daemon.bin.checksum.value}"/>
</antcall>
<!-- Download JDT (Eclipse compiler) -->
<antcall target="downloadfile-2">
<param name="sourcefile.1" value="${jdt.loc.1}"/>
<param name="sourcefile.2" value="${jdt.loc.2}"/>
<param name="destfile" value="${jdt.jar}"/>
<param name="destdir" value="${jdt.home}"/>
<param name="checksum.enabled" value="${jdt.checksum.enabled}"/>
<param name="checksum.algorithm" value="${jdt.checksum.algorithm}"/>
<param name="checksum.value" value="${jdt.checksum.value}"/>
</antcall>
<!-- Download SAAJ API -->
<antcall target="downloadfile">
<param name="sourcefile" value="${saaj-api.loc}"/>
<param name="destfile" value="${saaj-api.jar}"/>
<param name="destdir" value="${saaj-api.home}"/>
<param name="checksum.enabled" value="${saaj-api.checksum.enabled}"/>
<param name="checksum.algorithm" value="${saaj-api.checksum.algorithm}"/>
<param name="checksum.value" value="${saaj-api.checksum.value}"/>
</antcall>
<!-- Download WS API -->
<antcall target="downloadfile">
<param name="sourcefile" value="${jaxrpc-lib.loc}"/>
<param name="destfile" value="${jaxrpc-lib.jar}"/>
<param name="destdir" value="${jaxrpc-lib.home}"/>
<param name="checksum.enabled" value="${jaxrpc-lib.checksum.enabled}"/>
<param name="checksum.algorithm" value="${jaxrpc-lib.checksum.algorithm}"/>
<param name="checksum.value" value="${jaxrpc-lib.checksum.value}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${wsdl4j-lib.loc}"/>
<param name="destfile" value="${wsdl4j-lib.jar}"/>
<param name="destdir" value="${wsdl4j-lib.home}"/>
<param name="checksum.enabled" value="${wsdl4j-lib.checksum.enabled}"/>
<param name="checksum.algorithm" value="${wsdl4j-lib.checksum.algorithm}"/>
<param name="checksum.value" value="${wsdl4j-lib.checksum.value}"/>
</antcall>
</target>
<target name="download-test-compile"
description="Download additional components for the tests" >
<antcall target="downloadfile">
<param name="sourcefile" value="${junit.loc}"/>
<param name="destfile" value="${junit.jar}"/>
<param name="destdir" value="${junit.home}"/>
<param name="checksum.enabled" value="${junit.checksum.enabled}"/>
<param name="checksum.algorithm" value="${junit.checksum.algorithm}"/>
<param name="checksum.value" value="${junit.checksum.value}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${hamcrest.loc}"/>
<param name="destfile" value="${hamcrest.jar}"/>
<param name="destdir" value="${hamcrest.home}"/>
<param name="checksum.enabled" value="${hamcrest.checksum.enabled}"/>
<param name="checksum.algorithm" value="${hamcrest.checksum.algorithm}"/>
<param name="checksum.value" value="${hamcrest.checksum.value}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${easymock.loc}"/>
<param name="destfile" value="${easymock.jar}"/>
<param name="destdir" value="${easymock.home}"/>
<param name="checksum.enabled" value="${easymock.checksum.enabled}"/>
<param name="checksum.algorithm" value="${easymock.checksum.algorithm}"/>
<param name="checksum.value" value="${easymock.checksum.value}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${cglib.loc}"/>
<param name="destfile" value="${cglib.jar}"/>
<param name="destdir" value="${cglib.home}"/>
<param name="checksum.enabled" value="${cglib.checksum.enabled}"/>
<param name="checksum.algorithm" value="${cglib.checksum.algorithm}"/>
<param name="checksum.value" value="${cglib.checksum.value}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${objenesis.loc}"/>
<param name="destfile" value="${objenesis.jar}"/>
<param name="destdir" value="${objenesis.home}"/>
<param name="checksum.enabled" value="${objenesis.checksum.enabled}"/>
<param name="checksum.algorithm" value="${objenesis.checksum.algorithm}"/>
<param name="checksum.value" value="${objenesis.checksum.value}"/>
</antcall>
</target>
<target name="download-cobertura"
if="${test.cobertura}"
description="Download the Cobertura code coverage tool" >
<antcall target="downloadgz">
<param name="sourcefile" value="${cobertura.loc}"/>
<param name="destfile" value="${cobertura.jar}"/>
<param name="checksum.enabled" value="${cobertura.checksum.enabled}"/>
<param name="checksum.algorithm" value="${cobertura.checksum.algorithm}"/>
<param name="checksum.value" value="${cobertura.checksum.value}"/>
</antcall>
</target>
<target name="download-findbugs"
if="${execute.findbugs}"
description="Download FindBugs" >
<antcall target="downloadgz">
<param name="sourcefile" value="${findbugs.loc}"/>
<param name="destfile" value="${findbugs.jar}"/>
<param name="checksum.enabled" value="${findbugs.checksum.enabled}"/>
<param name="checksum.algorithm" value="${findbugs.checksum.algorithm}"/>
<param name="checksum.value" value="${findbugs.checksum.value}"/>
</antcall>
</target>
<target name="download-dist"
description="Download additional components for a distribution" >
<antcall target="downloadfile-2">
<param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
<param name="sourcefile.2" value="${tomcat-native.loc.2}"/>
<param name="destfile" value="${tomcat-native.tar.gz}"/>
<param name="destdir" value="${tomcat-native.home}"/>
<param name="checksum.enabled" value="${tomcat-native.src.checksum.enabled}"/>
<param name="checksum.algorithm" value="${tomcat-native.src.checksum.algorithm}"/>
<param name="checksum.value" value="${tomcat-native.src.checksum.value}"/>
</antcall>
<antcall target="downloadzip-2">
<param name="sourcefile.1" value="${tomcat-native.win.1}"/>
<param name="sourcefile.2" value="${tomcat-native.win.2}"/>
<param name="destfile" value="${tomcat-native.home}/LICENSE"/>
<param name="destdir" value="${tomcat-native.home}"/>
<param name="checksum.enabled" value="${tomcat-native.win.checksum.enabled}"/>
<param name="checksum.algorithm" value="${tomcat-native.win.checksum.algorithm}"/>
<param name="checksum.value" value="${tomcat-native.win.checksum.value}"/>
</antcall>
<antcall target="downloadfile-2">
<param name="sourcefile.1" value="${commons-daemon.native.src.loc.1}"/>
<param name="sourcefile.2" value="${commons-daemon.native.src.loc.2}"/>
<param name="destfile" value="${commons-daemon.native.src.tgz}"/>
<param name="destdir" value="${commons-daemon.home}"/>
<param name="checksum.enabled" value="${commons-daemon.native.src.checksum.enabled}"/>
<param name="checksum.algorithm" value="${commons-daemon.native.src.checksum.algorithm}"/>
<param name="checksum.value" value="${commons-daemon.native.src.checksum.value}"/>
</antcall>
<antcall target="downloadzip-2">
<param name="sourcefile.1" value="${commons-daemon.native.win.loc.1}"/>
<param name="sourcefile.2" value="${commons-daemon.native.win.loc.2}"/>
<param name="destfile" value="${commons-daemon.native.win.mgr.exe}"/>
<param name="destdir" value="${commons-daemon.native.win.home}"/>
<param name="checksum.enabled" value="${commons-daemon.native.win.checksum.enabled}"/>
<param name="checksum.algorithm" value="${commons-daemon.native.win.checksum.algorithm}"/>
<param name="checksum.value" value="${commons-daemon.native.win.checksum.value}"/>
</antcall>
<antcall target="downloadzip">
<param name="sourcefile" value="${nsis.loc}"/>
<param name="destfile" value="${nsis.exe}"/>
<param name="destdir" value="${nsis.home}/.."/>
<param name="checksum.enabled" value="${nsis.checksum.enabled}"/>
<param name="checksum.algorithm" value="${nsis.checksum.algorithm}"/>
<param name="checksum.value" value="${nsis.checksum.value}"/>
</antcall>
</target>
<!-- =============== Utility Targets to support downloads ================ -->
<target name="setproxy" if="${proxy.use}">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
<echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
</target>
<target name="testexist">
<echo message="Testing for ${destfile}"/>
<available file="${destfile}" property="exist"/>
</target>
<macrodef name="verifyChecksum">
<attribute name="file" />
<attribute name="name" default="@{file}"/>
<attribute name="enabled" />
<attribute name="algorithm" />
<attribute name="value" />
<sequential>
<local name="name" />
<basename property="name" file="@{name}" />
<sequential if:true="@{enabled}">
<local name="check.md5" />
<local name="check.sha1" />
<local name="check.sha256" />
<local name="check.sha384" />
<local name="check.sha512" />
<local name="value.md5" />
<local name="value.sha1" />
<local name="value.sha256" />
<local name="value.sha384" />
<local name="value.sha512" />
<local name="check.success" />
<condition property="check.md5">
<or>
<equals arg1="@{algorithm}" arg2="MD5" />
<equals arg1="@{algorithm}" arg2="MD5|SHA-1" />
</or>
</condition>
<condition property="check.sha1">
<or>
<equals arg1="@{algorithm}" arg2="SHA-1" />
<equals arg1="@{algorithm}" arg2="MD5|SHA-1" />
</or>
</condition>
<condition property="check.sha256">
<equals arg1="@{algorithm}" arg2="SHA-256" />
</condition>
<condition property="check.sha384">
<equals arg1="@{algorithm}" arg2="SHA-384" />
</condition>
<condition property="check.sha512">
<equals arg1="@{algorithm}" arg2="SHA-512" />
</condition>
<!-- Check that any checksum algorithm is selected -->
<fail message="Unknown algorithm: @{algorithm}">
<condition>
<not>
<or>
<equals arg1="${check.md5}" arg2="true" />
<equals arg1="${check.sha1}" arg2="true" />
<equals arg1="${check.sha256}" arg2="true" />
<equals arg1="${check.sha384}" arg2="true" />
<equals arg1="${check.sha512}" arg2="true" />
</or>
</not>
</condition>
</fail>
<!-- Calculate requested checksums -->
<checksum file="@{file}" if:true="${check.md5}" property="value.md5" algorithm="MD5" />
<checksum file="@{file}" if:true="${check.sha1}" property="value.sha1" algorithm="SHA-1" />
<checksum file="@{file}" if:true="${check.sha256}" property="value.sha256" algorithm="SHA-256" />
<checksum file="@{file}" if:true="${check.sha384}" property="value.sha384" algorithm="SHA-384" />
<checksum file="@{file}" if:true="${check.sha512}" property="value.sha512" algorithm="SHA-512" />
<!-- Check actual checksum value -->
<condition property="check.success">
<or>
<and>
<equals arg1="@{algorithm}" arg2="MD5" />
<equals arg1="@{value}" arg2="${value.md5}" />
</and>
<and>
<equals arg1="@{algorithm}" arg2="SHA-1" />
<equals arg1="@{value}" arg2="${value.sha1}" />
</and>
<and>
<equals arg1="@{algorithm}" arg2="MD5|SHA-1" />
<equals arg1="@{value}" arg2="${value.md5}|${value.sha1}" />
</and>
<and>
<equals arg1="@{algorithm}" arg2="SHA-256" />
<equals arg1="@{value}" arg2="${value.sha256}" />
</and>
<and>
<equals arg1="@{algorithm}" arg2="SHA-384" />
<equals arg1="@{value}" arg2="${value.sha384}" />
</and>
<and>
<equals arg1="@{algorithm}" arg2="SHA-512" />
<equals arg1="@{value}" arg2="${value.sha512}" />
</and>
</or>
</condition>
<!-- Fail or display a success message -->
<sequential unless:true="${check.success}">
<!-- Generate checksums for an error message -->
<checksum file="@{file}" unless:set="value.md5" property="value.md5" algorithm="MD5" />
<checksum file="@{file}" unless:set="value.sha1" property="value.sha1" algorithm="SHA-1" />
<checksum file="@{file}" unless:set="value.sha256" property="value.sha256" algorithm="SHA-256" />
<checksum file="@{file}" unless:set="value.sha384" property="value.sha384" algorithm="SHA-384" />
<checksum file="@{file}" unless:set="value.sha512" property="value.sha512" algorithm="SHA-512" />
<fail>
Checksum check failure for ${name} (@{file}).
Algorithm: @{algorithm}
Expected value: @{value}
Actual values:
SHA-512: ${value.sha512}
SHA-384: ${value.sha384}
SHA-256: ${value.sha256}
SHA-1: ${value.sha1}
MD5: ${value.md5}
</fail>
</sequential>
<echo level="info" message="Checksum check for ${name}, algorithm @{algorithm}: OK" />
</sequential>
<echo unless:true="@{enabled}" message="WARNING: Checksum verification is disabled for ${name}"/>
</sequential>
</macrodef>
<target name="downloadgz" unless="exist" depends="testexist,setproxy">
<!-- Download and extract the package -->
<local name="temp.file"/>
<mkdir dir="${base.path}"/>
<tempfile property="temp.file" destdir="${base.path}" prefix="download-"/>
<get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${temp.file}.tar.gz" />
<verifyChecksum
enabled="${checksum.enabled}"
algorithm="${checksum.algorithm}" value="${checksum.value}"
file="${temp.file}.tar.gz" name="${sourcefile}" />
<gunzip src="${temp.file}.tar.gz" dest="${temp.file}.tar"/>
<untar src="${temp.file}.tar" dest="${base.path}"/>
<delete file="${temp.file}.tar"/>
<delete file="${temp.file}.tar.gz"/>
</target>
<target name="downloadgz-2" unless="exist" depends="testexist">
<!-- Download and extract the package from the two alternative locations -->
<local name="temp.file"/>
<mkdir dir="${base.path}"/>
<tempfile property="temp.file" destdir="${base.path}" prefix="download-"/>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.1}" />
<param name="destfile" value="${temp.file}.tar.gz" />
</antcall>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.2}" />
<param name="destfile" value="${temp.file}.tar.gz" />
</antcall>
<verifyChecksum
enabled="${checksum.enabled}"
algorithm="${checksum.algorithm}" value="${checksum.value}"
file="${temp.file}.tar.gz" name="${sourcefile.1}" />
<gunzip src="${temp.file}.tar.gz" dest="${temp.file}.tar"/>
<untar src="${temp.file}.tar" dest="${base.path}"/>
<delete file="${temp.file}.tar"/>
<delete file="${temp.file}.tar.gz"/>
</target>
<target name="downloadzip" unless="exist" depends="testexist,setproxy">
<!-- Download and extract the package -->
<local name="temp.file"/>
<mkdir dir="${base.path}"/>
<tempfile property="temp.file" destdir="${base.path}" prefix="download-" suffix=".zip"/>
<get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${temp.file}"/>
<verifyChecksum
enabled="${checksum.enabled}"
algorithm="${checksum.algorithm}" value="${checksum.value}"
file="${temp.file}" name="${sourcefile}" />
<mkdir dir="${destdir}"/>
<unzip src="${temp.file}" dest="${destdir}"/>
<delete file="${temp.file}"/>
</target>
<target name="downloadzip-2" unless="exist" depends="testexist">
<!-- Download and extract the package from the two alternative locations -->
<local name="temp.file"/>
<mkdir dir="${base.path}"/>
<tempfile property="temp.file" destdir="${base.path}" prefix="download-" suffix=".zip"/>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.1}" />
<param name="destfile" value="${temp.file}" />
</antcall>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.2}" />
<param name="destfile" value="${temp.file}" />
</antcall>
<verifyChecksum
enabled="${checksum.enabled}"
algorithm="${checksum.algorithm}" value="${checksum.value}"
file="${temp.file}" name="${sourcefile.1}" />
<mkdir dir="${destdir}" />
<unzip src="${temp.file}" dest="${destdir}"/>
<delete file="${temp.file}"/>
</target>
<target name="downloadfile" unless="exist" depends="testexist,setproxy">
<!-- Download the file -->
<local name="temp.file"/>
<mkdir dir="${base.path}"/>
<tempfile property="temp.file" destdir="${base.path}" prefix="download-" suffix=".tmp"/>
<get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${temp.file}"/>
<verifyChecksum
enabled="${checksum.enabled}"
algorithm="${checksum.algorithm}" value="${checksum.value}"
file="${temp.file}" name="${destfile}" />
<mkdir dir="${destdir}"/>
<move file="${temp.file}" tofile="${destfile}"/>
</target>
<target name="downloadfile-2" unless="exist" depends="testexist">
<!-- Download the file from the two alternative locations -->
<local name="temp.file"/>
<mkdir dir="${base.path}"/>
<tempfile property="temp.file" destdir="${base.path}" prefix="download-" suffix=".tmp"/>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.1}" />
<param name="destfile" value="${temp.file}" />
</antcall>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.2}" />
<param name="destfile" value="${temp.file}" />
</antcall>
<available file="${temp.file}" property="exist"/>
<fail unless="exist" message="Failed to download [${destfile}]. All download sources are unavailable." />
<verifyChecksum
enabled="${checksum.enabled}"
algorithm="${checksum.algorithm}" value="${checksum.value}"
file="${temp.file}" name="${destfile}" />
<mkdir dir="${destdir}"/>
<move file="${temp.file}" tofile="${destfile}"/>
</target>
<target name="trydownload.check" depends="setproxy">
<condition property="trydownload.run">
<and>
<not>
<available file="${destfile}" />
</not>
<http url="${sourcefile}" />
</and>
</condition>
</target>
<target name="trydownload" if="trydownload.run" depends="trydownload.check">
<!-- Downloads a file if not yet downloaded and the source URL is available -->
<get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" />
</target>
<!-- ============================ IDE Support ============================ -->
<!-- ============================ Eclipse ================================ -->
<target name="ide-eclipse"
depends="download-compile, download-test-compile"
description="Prepares the source tree to be built in Eclipse">
<!-- Copy the sample project files into the root directory -->
<copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
<copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.classpath" tofile="${tomcat.home}/.classpath"/>
<!-- Copy compiler settings file -->
<mkdir dir="${tomcat.home}/.settings" />
<copy file="${tomcat.home}/res/ide-support/eclipse/org.eclipse.jdt.core.prefs.properties" tofile="${tomcat.home}/.settings/org.eclipse.jdt.core.prefs"/>
<echo>Eclipse project files created.
Read the Building page on the Apache Tomcat documentation site for details on how to configure your Eclipse workspace.</echo>
</target>
<!-- ============================ IntelliJ IDEA=========================== -->
<target name="ide-intellij"
depends="download-compile, download-test-compile"
description="Creates project directory .idea for IntelliJ IDEA">
<copy todir="${tomcat.home}/.idea">
<fileset dir="${tomcat.home}/res/ide-support/idea"/>
</copy>
<echo>IntelliJ IDEA project directory created. Please create PATH VARIABLES for
ANT_HOME = ${ant.home}
TOMCAT_BUILD_LIBS = ${base.path}
</echo>
</target>
<!-- ============================ NetBeans =============================== -->
<target name="ide-netbeans"
depends="-ide-netbeans-protect,-ide-netbeans-create"
description="Create NetBeans project files only if none exist">
</target>
<target name="-ide-netbeans-protect"
if="tomcat-nb.home.exists"
depends="-ide-netbeans-check">
<!-- Protect existing NetBeans project files -->
<echo>NetBeans project files already exist and have been protected!
Use the "ide-netbeans-replace" target if you wish to overwrite them.</echo>
</target>
<target name="-ide-netbeans-check">
<!-- protect existing files if the NetBeans project directory exists -->
<condition property="tomcat-nb.home.exists">
<available file="${tomcat-nb.home}" type="dir"/>
</condition>
</target>
<target name="ide-netbeans-replace" depends="-ide-netbeans-create">
<!-- Bypass protection of any existing NetBeans project files -->
</target>
<target name="-ide-netbeans-create"
unless="tomcat-nb.home.exists">
<!-- Unconditionally create or overwrite default NetBeans project files -->
<property name="tomcat-nb.dist" value="${tomcat.home}/res/ide-support/netbeans" />
<mkdir dir="${tomcat-nb.home}/"/>
<copy todir="${tomcat-nb.home}" overwrite="true">
<fileset dir="${tomcat-nb.dist}"/>
</copy>
<echo>NetBeans project files created.
Read the Building page on the Apache Tomcat documentation site for details on how to customise your NetBeans project.</echo>
</target>
<!-- ======================= Macros, Taskdefs etc ======================== -->
<target name="download-bnd" >
<!-- Download bnd -->
<antcall target="downloadfile">
<param name="sourcefile" value="${bnd.loc}"/>
<param name="destfile" value="${bnd.jar}"/>
<param name="destdir" value="${bnd.home}"/>
<param name="checksum.enabled" value="${bnd.checksum.enabled}"/>
<param name="checksum.algorithm" value="${bnd.checksum.algorithm}"/>
<param name="checksum.value" value="${bnd.checksum.value}"/>
</antcall>
<!-- Download bndlib -->
<antcall target="downloadfile">
<param name="sourcefile" value="${bndlib.loc}"/>
<param name="destfile" value="${bndlib.jar}"/>
<param name="destdir" value="${bndlib.home}"/>
<param name="checksum.enabled" value="${bndlib.checksum.enabled}"/>
<param name="checksum.algorithm" value="${bndlib.checksum.algorithm}"/>
<param name="checksum.value" value="${bndlib.checksum.value}"/>
</antcall>
</target>
<target name="setup-bnd" depends="download-bnd">
<!-- Add bnd tasks to project -->
<path id="bndlib.classpath">
<fileset file="${bnd.jar}" />
<fileset file="${bndlib.jar}" />
</path>
<taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="bndlib.classpath" />
</target>
<macrodef name="jarIt" description="utility macro for standard JAR packaging">
<attribute name="jarfile"
description="the name of the JAR file to create"/>
<attribute name="filesDir"
description="the directory from which to obtain the files "/>
<attribute name="filesId"
description="the patternset id of the files to use"/>
<attribute name="manifest" description="the manifest file use"
default="${tomcat.manifests}/default.manifest" />
<attribute name="notice" description="the LICENSE file to use"
default="${tomcat.manifests}/default.notice" />
<attribute name="license" description="the NOTICE file to use"
default="${tomcat.manifests}/default.license" />
<attribute name="meta-inf" description="additional contents for META-INF"
default="${tomcat.manifests}/default" />
<attribute name="addOSGi" description="generate OSGi metadata"
default="false" />
<attribute name="addGraal" description="add Graal resource/reflection files if set"
default="false" />
<attribute name="graalPrefix" description="Graal resource/reflection location prefix (group_id/artifact_id)"
default="" />
<attribute name="graalFiles" description="Graal resource/reflection file location"
default="" />
<sequential>
<jar jarfile="@{jarfile}" manifest="@{manifest}">
<fileset dir="@{filesDir}">
<patternset refid="@{filesId}"/>
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset dir="@{meta-inf}" prefix="META-INF/"
excludes=".gitignore" />
<zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
<zipfileset file="@{license}" fullpath="META-INF/LICENSE" />
</jar>
<antcall target="add-osgi" >
<param name="jarfile" value="@{jarfile}" />
<param name="addOSGi" value="@{addOSGi}" />
</antcall>
<antcall target="add-graal">
<param name="jarfile" value="@{jarfile}" />
<param name="addGraal" value="@{addGraal}" />
<param name="graalFiles" value="@{graalFiles}" />
<param name="graalPrefix" value="@{graalPrefix}" />
</antcall>
</sequential>
</macrodef>
<target name="add-osgi" if="${addOSGi}" >
<echo message="add-osgi ${jarfile} ${addOSGi}"></echo>
<bndwrap output="${jarfile}.tmp" definitions="${tomcat.bnd}" >
<fileset file="${jarfile}" />
</bndwrap>
<delete file="${jarfile}" />
<move file="${jarfile}.tmp" tofile="${jarfile}" />
</target>
<target name="add-graal" if="${addGraal}">
<echo message="add-graal ${addGraal} ${jarfile} ${graalFiles} ${graalPrefix}"></echo>
<zip destfile="${jarfile}" update="true">
<zipfileset dir="${basedir}/${graalFiles}" prefix="META-INF/native-image/${graalPrefix}" includes="*.*"/>
</zip>
</target>
<!-- Macro, used to create checksum and signature files -->
<!-- Requires 'file' as a parameter. -->
<macrodef name="hashAndSign">
<attribute name="file" />
<sequential>
<local name="filename" />
<local name="sha512value" />
<basename file="@{file}" property="filename" />
<checksum algorithm="SHA-512" file="@{file}" property="sha512value" />
<echo file="@{file}.sha512" message="${sha512value}${md5sum.binary-prefix}${filename}" />
<antcall target="sign" >
<param name="file" value="@{file}" />
</antcall>
</sequential>
</macrodef>
<!-- Helper target, used to create a detached ascii OpenPGP signature. -->
<!-- Uses GPG with default key. Requires 'file' as a parameter. Only -->
<!-- executes if gpg passphrase is set which is only set when using the -->
<!-- release target. -->
<target name="sign" if="gpg.passphrase">
<fail unless="file" />
<exec executable="${gpg.exec}" failonerror="true"
inputstring="${gpg.passphrase}">
<arg value="--batch"/>
<arg value="--pinentry-mode"/>
<arg value="loopback"/>
<arg value="--passphrase-fd"/>
<arg value="0"/>
<arg value="-a"/>
<arg value="-b"/>
<arg value="${file}"/>
</exec>
</target>
</project>
================================================================================
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.
================================================================================
====================================================
Building The Apache Tomcat @VERSION_MAJOR_MINOR@ Servlet/JSP Container
====================================================
This project contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a container that
implements the Jakarta Servlet 5.0, JSP 3.0, EL 4.0, WebSocket 2.0 and
Authentication 2.0 specifications from the Jakarta EE project at Eclipse
<https://jakarta.ee//>.
Note: If you just need to run Apache Tomcat, it is not necessary to build
it. You may simply download a binary distribution. It is cross-platform.
Read RUNNING.txt for the instruction on how to run it.
In order to build a binary distribution version of Apache Tomcat from a
source distribution, do the following:
(1) Download and Install a Java Development Kit
1. If the JDK is already installed, skip to (2).
2. Download a version 8 of Java Development Kit (JDK) release (use the
latest update available for your chosen version) from one of:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
http://openjdk.java.net/install/index.html
or another JDK vendor.
Note regarding later versions of Java:
As documented elsewhere, one of components in Apache Tomcat includes
a private copy of the Apache Commons DBCP 2 library.
The JDBC interfaces implemented by DBCP frequently change in non-backwards
compatible ways between versions of the Java SE specification. Therefore,
it is likely that DBCP 2 will only compile with the specific version of Java
listed above and that compilation will fail if a later version of Java is
used.
See Apache Commons DBCP 2 project web site for more details on
available versions of the library and its requirements,
https://commons.apache.org/dbcp/
3. Install the JDK according to the instructions included with the release.
4. Set an environment variable JAVA_HOME to the pathname of the directory
into which you installed the JDK release.
(2) Install Apache Ant version 1.9.8 or later on your computer.
1. If Apache Ant version 1.9.8 or later is already installed on your
computer, skip to (3).
2. Download a binary distribution of Ant from:
https://ant.apache.org/bindownload.cgi
3. Unpack the binary distribution into a convenient location so that the
Ant release resides in its own directory (conventionally named
"apache-ant-[version]").
For the purposes of the remainder of this document, the symbolic name
"${ant.home}" is used to refer to the full pathname of the release
directory.
4. Create an ANT_HOME environment variable to point the directory
${ant.home}.
5. Modify the PATH environment variable to include the directory
${ant.home}/bin in its list. This makes the "ant" command line script
available, which will be used to actually perform the build.
(3) Building Tomcat @VERSION_MAJOR_MINOR@
(3.1) Checkout or obtain the source code for Tomcat @VERSION_MAJOR_MINOR@
Clone the source using git, then checkout a specific major branch or
master for the latest code development, or download and unpack a source
package.
* Tomcat GitHub repository URL:
https://github.com/apache/tomcat
* Source packages can be downloaded from:
https://tomcat.apache.org/download-@[email protected]
The location where the source has been placed will be further referred as
${tomcat.source}.
The Tomcat local build process does not modify line-endings. The svn repository
is configured so that all files will be checked out with the line-ending
appropriate for the current platform. When using a source package you should
ensure that you use the source package that has the appropriate line-ending
for your platform:
zip -> CRLF
tar.gz -> LF
Note that the release build process does modify line-endings to ensure that
each release package has the appropriate line-endings.
(3.2) Building
1. The build is controlled by creating a ${tomcat.source}/build.properties
file.
It is recommended to always create the file, because of unfortunate
default value of base.path property. You may start with the following
content for the file:
# ----- Default Base Path for Dependent Packages -----
# Replace this path with the directory path where dependencies binaries
# should be downloaded
base.path=/home/me/some-place-to-download-to
2. Configure base.path property by adding it to the
${tomcat.source}/build.properties file.
The base.path property specifies the place where Tomcat dependencies
required by the build are downloaded. It is recommended to place this
directory outside of the source tree, so that you do not waste your
time re-downloading the libraries.
* NOTE: The default value of the base.path property configures the build script
to download the libraries required to build Tomcat to the
${user.home}/tomcat-build-libs directory.
* NOTE: Users accessing the Internet through a proxy must use the properties
file to indicate to Ant the proxy configuration.
The following properties should be added to the ${tomcat.source}/build.properties
file.
proxy.use=true
proxy.host=proxy.domain
proxy.port=8080
proxy.user=username
proxy.password=password
See Apache Ant documentation for the <setproxy> task for details.
3. Go to the sources directory and run Ant:
cd ${tomcat.source}
ant
This will execute the "deploy" target in build.xml.
Once the build has completed successfully, a usable Tomcat installation
will have been produced in the ${tomcat.source}/output/build directory,
and can be started and stopped with the usual scripts.
Note that the build includes Tomcat documentation, which can be found
in the output/build/webapps/docs directory.
The path of the output directory can be controlled by specifying the
"tomcat.output" property in the build.properties file.
* NOTE: Do not run the build as the root user. Building and running Tomcat
does not require root privileges.
(4) Updating sources and rebuilding
It is recommended that you regularly update the downloaded Tomcat @VERSION_MAJOR_MINOR@
sources using your git client.
For a quick rebuild of only modified code you can use:
cd ${tomcat.source}
ant
(5) Special builds
There are several targets in Tomcat build files that are useful to be
called separately. They build components that you may want to build
quickly, or ones that are included in the full release and are not built
during the default "deploy" build.
(5.1) Building documentation
The documentation web application is built during the default "deploy"
build.
It can be built quickly by using the following commands:
cd ${tomcat.source}
ant build-docs
The output of this command will be found in the following directory:
output/build/webapps/docs
The API documentation (Javadoc) is built during a "release" build. It is
easy to build it separately by using the following commands:
cd ${tomcat.source}
ant javadoc
The output of this command will be found in the following directories:
output/dist/webapps/docs/api
output/dist/webapps/docs/elapi
output/dist/webapps/docs/jspapi
output/dist/webapps/docs/servletapi
(5.2) Building the extras (commons-logging, webservices etc.)
These components are documented on the "Additional Components"
(extras.html) page of documentation. They are built during a "release"
build.
You can build them by using the following commands:
cd ${tomcat.source}
ant extras
(5.3) Building the embedded packages
These are built during a "release" build.
You can build them by using the following commands:
cd ${tomcat.source}
ant embed
(6) Building a full release (as provided via the ASF download pages)
A full release includes the Windows installer which requires a Windows
environment to be available to create it. If not building in a Windows
environment, the build scripts assume that Wine is available. If this is not
the case, the skip.installer property may be set to skip the creation of the
Windows installer.
1. Configure GPG, if needed
If the released artifacts have to be cryptographically signed with a
PGP signature, like the official ASF releases are, the following
property can be added to the build.properties file:
# Location of GPG executable (used only for releases)
gpg.exec=/path/to/gpg
You do not need it if you do not plan to sign the release.
If "gpg.exec" property does not point to an existing file, it will be
ignored and this feature will be disabled.
You will be prompted for the GPG passphrase when the release build
starts, unless "gpg.passphrase" property is set.
2. If building the Windows installer
If running the build in a UAC enabled environment, building the Windows
installer requires elevated privileges. The simplest way to do this is to
open the command prompt used for the build with the "Run as administrator"
option.
3. Configure the code signing service
ASF committers performing official releases will need to configure the code
signing service so that the Windows installer is signed during the build
process. The following properties need to be added to the build.properties
file:
# Location of GPG executable (used only for releases)
# Code signing of Windows installer
do.codesigning=true
codesigning.user=request-via-pmc
codesigning.pwd=request-via-pmc
codesigning.partnercode=request-via-pmc
codesigning.service=Microsoft Windows Signing
Release managers will be provided with the necessary credentials by the PMC.
4. Build the release:
cd ${tomcat.source}
ant release
(7) Tests
(7.1) Running Tomcat tests
Tomcat includes a number of junit tests. The tests are not run when a
release is built. There is separate command to run them.
To run the testsuite use the following command:
cd ${tomcat.source}
ant test
It is advisable to redirect output of the above command to a file for later
inspection.
The JUnit reports generated by the tests will be written to the following
directory:
output/build/logs
By default the testsuite is run three times to test 3 different
implementations of Tomcat connectors: NIO, NIO2 and APR. (If you are not
familiar with Tomcat connectors, see config/http.html in documentation for
details).
The 3 runs are enabled and disabled individually by the following
properties, which all are "true" by default:
execute.test.nio=true
execute.test.nio2=true
execute.test.apr=true
The APR connector can be tested only if Tomcat-Native library binaries are
found by the testsuite. The "test.apr.loc" property specifies the directory
where the library binaries are located.
By default the "test.apr.loc" property specifies the following location:
output/build/bin/native/
If you are on Windows and want to test the APR connector you can put the
tcnative-1.dll file into ${tomcat.source}/bin/native/ and it will be copied
into the above directory when the build runs.
The unit tests include tests of the clustering functionality which require
multicast to be enabled. There is a simple application provided in the Tomcat
test source (org.apache.catalina.tribes.TesterMulticast) that can be used to
check if a machine supports multicast. Notes on enabling multicast for different
operating systems are provided in the Javadoc for that class.
(7.2) Running a single test
It is possible to run a single JUnit test class by adding the "test.entry"
property to the build.properties file. The property specifies the name of
the test class.
For example:
test.entry=org.apache.catalina.util.TestServerInfo
It is possible to further limit such run to a number of selected test
methods by adding "test.entry.methods" property. The property specifies a
comma-separated list of test case methods.
For example:
test.entry=org.apache.el.lang.TestELArithmetic
test.entry.methods=testMultiply01,testMultiply02
(7.3) Running a set of tests
It is possible to run a set of JUnit test classes by adding the "test.name"
property to the build.properties file. The property specifies an Ant
includes pattern for the fileset of test class files to run.
The default value is "**/Test*.java", so all test classes are being
executed (with few exceptions - see build.xml for several exclude patterns).
You can include multiple patterns by concatenating them with a comma (",")
as the separator.
For example:
test.name=**/TestSsl.java,**/TestWebSocketFrameClientSSL.java
You can exclude specific JUnit test classes by adding the "test.exclude"
property to the build.properties file. The property specifies an Ant
excludes pattern for the fileset of test class files to exclude form the run.
The default value is empty, so no classes are excluded. The syntax is the same
as for the property "test.name".
(7.4) Other configuration options
1. It is possible to configure the directory where JUnit reports are
written to. It is configured by "test.reports" property. The default
value is
output/build/logs
2. It is possible to enable generation of access log file when the tests
are run. This is off by default and can be enabled by the following
property:
test.accesslog=true
The "access_log.<date>" file will be written to the same directory as
JUnit reports,
output/build/logs
3. The testsuite respects logging configuration as configured by
${tomcat.source}/conf/logging.properties
The log files will be written to the temporary directory used by the
tests,
output/test-tmp/logs
4. It is possible to configure formatter used by JUnit reports.
Configuration properties are "junit.formatter.type",
"junit.formatter.extension" and "junit.formatter.usefile".
For example the following property disables generation of separate report
files:
junit.formatter.usefile=false
5. It is possible to speed up testing by letting JUnit to run several
tests in parallel.
This is configured by setting "test.threads" property. The recommended
value is one thread per core.
6. Optional support is provided for the Cobertura code coverage tool.
NOTE: Cobertura is licensed under GPL v2 with parts of it being under
Apache License v1.1. See https://cobertura.github.io/cobertura/ for details.
Using it during Tomcat build is optional and is off by default.
Cobertura can be enabled using the following properties:
test.cobertura=true
test.threads=1
Using Cobertura currently requires setting test.threads configuration
property to the value of 1. Setting that property to a different value
will disable code coverage.
The report files by default are written to
output/coverage
7. The performance tests are written to run reasonably powerful machines (such
as a developer may use day to day) assuming no other resource hungry
processes are running.
These assumptions are not always true (e.g. on CI systems running in a
virtual machine) so the performance tests may be disabled by using the
following property:
test.excludePerformance=true
8. Some tests include checks that the access log valve entries are as expected.
These checks include timings. On slower / loaded systems these checks will
often fail. The checks may be relaxed by using the following property:
test.relaxTiming=true
9. It is known that some platforms (e.g. OSX El Capitan) require IPv4 to
be the default for the multicast tests to work. This is configured by
the following property:
java.net.preferIPv4Stack=true
10. It is possible to control whether the output of the tests is displayed
on the console or not. By default it is displayed and can be disabled
by the following property:
test.verbose=true
(8) Source code checks
(8.1) Checkstyle
NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat
build is optional and is off by default.
See http://checkstyle.sourceforge.net/ for more information.
Tomcat comes with a Checkstyle configuration that tests its source code
for certain conventions, like presence of the license header.
To enable Checkstyle, add the following property to build.properties file:
execute.validate=true
Once Checkstyle is enabled, the check will be performed automatically
during the build. The check is run before compilation of the source code.
To speed-up repeated runs of this check, a cache is configured. The cache
is located in the following directory:
output/res/checkstyle
It is possible to run the check separately by calling the "validate"
target. The command is:
cd ${tomcat.source}
ant -Dexecute.validate=true validate
(8.2) FindBugs
NOTE: FindBugs is licensed under LGPL. Using Findbugs during Tomcat build is
optional and is off by default.
See https://spotbugs.github.io/ for more information.
To enable FindBugs, add the following property to build.properties file:
execute.findbugs=true
To compile Tomcat classes and generate a FindBugs report, call the
"findbugs" target. For example:
cd ${tomcat.source}
ant -Dexecute.findbugs=true findbugs
The report file by default is written to
output/findbugs
(8.3) End-of-line conventions check
You usually would not need to run this check. You can skip this section.
Apache Tomcat project has convention that all of its textual source files,
stored in the Git repository, use Unix style LF line endings.
This test is used by developers to check that the source code adheres to
this convention. It verifies that the ends of lines in textual files are
appropriate. The idea is to run this check regularly and notify developers
when an inconsistency is detected.
The command to run this test is:
cd ${tomcat.source}
ant validate-eoln
// 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.
// ============================================================================
// catalina.policy - Security Policy Permissions for Tomcat
//
// This file contains a default set of security policies to be enforced (by the
// JVM) when Catalina is executed with the "-security" option. In addition
// to the permissions granted here, the following additional permissions are
// granted to each web application:
//
// * Read access to the web application's document root directory
// * Read, write and delete access to the web application's working directory
// ============================================================================
// ========== SYSTEM CODE PERMISSIONS =========================================
// These permissions apply to javac
grant codeBase "file:${java.home}/lib/-" {
permission java.security.AllPermission;
};
// These permissions apply to all shared system extensions
grant codeBase "file:${java.home}/jre/lib/ext/-" {
permission java.security.AllPermission;
};
// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/../lib/-" {
permission java.security.AllPermission;
};
// These permissions apply to all shared system extensions when
// ${java.home} points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/lib/ext/-" {
permission java.security.AllPermission;
};
// ========== CATALINA CODE PERMISSIONS =======================================
// These permissions apply to the daemon code
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the logging API
// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
// update this section accordingly.
// grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
permission java.io.FilePermission
"${java.home}${file.separator}lib${file.separator}logging.properties", "read";
permission java.io.FilePermission
"${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
permission java.io.FilePermission
"${catalina.base}${file.separator}logs", "read, write";
permission java.io.FilePermission
"${catalina.base}${file.separator}logs${file.separator}*", "read, write, delete";
permission java.lang.RuntimePermission "shutdownHooks";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "setContextClassLoader";
permission java.lang.management.ManagementPermission "monitor";
permission java.util.logging.LoggingPermission "control";
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";
permission java.util.PropertyPermission "catalina.base", "read";
// Note: To enable per context logging configuration, permit read access to
// the appropriate file. Be sure that the logging configuration is
// secure before enabling such access.
// E.g. for the examples web application (uncomment and unwrap
// the following to be on a single line):
// permission java.io.FilePermission "${catalina.base}${file.separator}
// webapps${file.separator}examples${file.separator}WEB-INF
// ${file.separator}classes${file.separator}logging.properties", "read";
};
// These permissions apply to the server startup code
grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the servlet API classes
// and those that are shared across all class loaders
// located in the "lib" directory
grant codeBase "file:${catalina.home}/lib/-" {
permission java.security.AllPermission;
};
// If using a per instance lib directory, i.e. ${catalina.base}/lib,
// then the following permission will need to be uncommented
// grant codeBase "file:${catalina.base}/lib/-" {
// permission java.security.AllPermission;
// };
// ========== WEB APPLICATION PERMISSIONS =====================================
// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// for all files and directories in its document root.
grant {
// Required for JNDI lookup of named JDBC DataSource's and
// javamail named MimePart DataSource used to send mail
permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "java.naming.*", "read";
permission java.util.PropertyPermission "javax.sql.*", "read";
// OS Specific properties to allow read access
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";
// JVM properties to allow read access
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";
permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
// Required for OpenJMX
permission java.lang.RuntimePermission "getAttribute";
// Allow read of JAXP compliant XML parser debug
permission java.util.PropertyPermission "jaxp.debug", "read";
// All JSPs need to be able to read this package
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat";
// Precompiled JSPs need access to these packages.
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.jasper.runtime.*";
// Applications using WebSocket need to be able to access these packages
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";
};
// The Manager application needs access to the following packages to support the
// 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
grant codeBase "file:${catalina.base}/webapps/manager/-" {
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
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";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
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.
//
// Different permissions can be granted to JSP pages, classes loaded from
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
//
// For instance, assume that the standard "examples" application
// included a JDBC driver that needed to establish a network connection to the
// corresponding database and used the scrape taglib to get the weather from
// the NOAA web server. You might create a "grant" entries like this:
//
// The permissions granted to the context root directory apply to JSP pages.
// grant codeBase "file:${catalina.base}/webapps/examples/-" {
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
//
// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
// };
//
// The permission granted to your JDBC driver
// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// };
// The permission granted to the scrape taglib
// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
// To grant permissions for web applications using packed WAR files, use the
// Tomcat specific WAR url scheme.
//
// The permissions granted to the entire web application
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/-" {
// };
//
// The permissions granted to a specific JAR
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
// };
# 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.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageDefinition unless the
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
# by default, no packages are restricted for definition, and none of
# the class loaders supplied with the JDK call checkPackageDefinition.
#
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
#
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
#
# Note: Values are enclosed in double quotes ("...") in case either the
# ${catalina.base} path or the ${catalina.home} path contains a comma.
# Because double quotes are used for quoting, the double quote character
# may not appear in a path.
common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"
#
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank, the "common" loader will be used as Catalina's "server"
# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
#
# Note: Values may be enclosed in double quotes ("...") in case either the
# ${catalina.base} path or the ${catalina.home} path contains a comma.
# Because double quotes are used for quoting, the double quote character
# may not appear in a path.
server.loader=
#
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
#
# Note: Values may be enclosed in double quotes ("...") in case either the
# ${catalina.base} path or the ${catalina.home} path contains a comma.
# Because double quotes are used for quoting, the double quote character
# may not appear in a path.
shared.loader=
# Default list of JAR files that should not be scanned using the JarScanner
# functionality. This is typically used to scan JARs for configuration
# information. JARs that do not contain such information may be excluded from
# the scan to speed up the scanning process. This is the default list. JARs on
# this list are excluded from all scans. The list must be a comma separated list
# of JAR file names.
# The list of JARs to skip may be over-ridden at a Context level for individual
# scan types by configuring a JarScanner with a nested JarScanFilter.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Test JARs (JUnit, Cobertura and dependencies)
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
annotations-api.jar,\
ant-junit*.jar,\
ant-launcher.jar,\
ant.jar,\
asm-*.jar,\
aspectj*.jar,\
bootstrap.jar,\
catalina-ant.jar,\
catalina-ha.jar,\
catalina-ssi.jar,\
catalina-storeconfig.jar,\
catalina-tribes.jar,\
catalina.jar,\
cglib-*.jar,\
cobertura-*.jar,\
commons-beanutils*.jar,\
commons-codec*.jar,\
commons-collections*.jar,\
commons-daemon.jar,\
commons-dbcp*.jar,\
commons-digester*.jar,\
commons-fileupload*.jar,\
commons-httpclient*.jar,\
commons-io*.jar,\
commons-lang*.jar,\
commons-logging*.jar,\
commons-math*.jar,\
commons-pool*.jar,\
dom4j-*.jar,\
easymock-*.jar,\
ecj-*.jar,\
el-api.jar,\
geronimo-spec-jaxrpc*.jar,\
h2*.jar,\
hamcrest-*.jar,\
hibernate*.jar,\
httpclient*.jar,\
icu4j-*.jar,\
jasper-el.jar,\
jasper.jar,\
jaspic-api.jar,\
jaxb-*.jar,\
jaxen-*.jar,\
jdom-*.jar,\
jetty-*.jar,\
jmx-tools.jar,\
jmx.jar,\
jsp-api.jar,\
jstl.jar,\
jta*.jar,\
junit-*.jar,\
junit.jar,\
log4j*.jar,\
mail*.jar,\
objenesis-*.jar,\
oraclepki.jar,\
oro-*.jar,\
servlet-api-*.jar,\
servlet-api.jar,\
slf4j*.jar,\
taglibs-standard-spec-*.jar,\
tagsoup-*.jar,\
tomcat-api.jar,\
tomcat-coyote.jar,\
tomcat-dbcp.jar,\
tomcat-i18n-*.jar,\
tomcat-jdbc.jar,\
tomcat-jni.jar,\
tomcat-juli-adapters.jar,\
tomcat-juli.jar,\
tomcat-util-scan.jar,\
tomcat-util.jar,\
tomcat-websocket.jar,\
tools.jar,\
websocket-api.jar,\
wsdl4j*.jar,\
xercesImpl.jar,\
xml-apis.jar,\
xmlParserAPIs-*.jar,\
xmlParserAPIs.jar,\
xom-*.jar
# Default list of JAR files that should be scanned that overrides the default
# jarsToSkip list above. This is typically used to include a specific JAR that
# has been excluded by a broad file name pattern in the jarsToSkip list.
# The list of JARs to scan may be over-ridden at a Context level for individual
# scan types by configuring a JarScanner with a nested JarScanFilter.
tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
log4j-taglib*.jar,\
log4j-web*.jar,\
log4javascript*.jar,\
slf4j-taglib*.jar
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to enable session persistence across Tomcat restarts -->
<!--
<Manager pathname="SESSIONS.ser" />
-->
</Context>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<jaspic-providers xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml jaspic-providers.xsd"
version="1.0">
<!-- No JASPIC providers configured by default -->
</jaspic-providers>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tomcat.apache.org/xml"
xmlns:jaspic="http://tomcat.apache.org/xml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
<xs:element name="jaspic-providers">
<xs:complexType>
<xs:sequence>
<xs:element name="provider" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" use="required" type="jaspic:propertyname" />
<xs:attribute name="value" use="required" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="className" type="xs:string" />
<xs:attribute name="layer" type="xs:string" />
<xs:attribute name="appContext" type="xs:string" />
<xs:attribute name="description" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:simpleType name="propertyname">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
# 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.
handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
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
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
java.util.logging.ConsoleHandler.encoding = UTF-8
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler
# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE
# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = FINE
# To see debug messages for HTTP/2 handling, uncomment the following line:
#org.apache.coyote.http2.level = FINE
# To see debug messages for WebSocket handling, uncomment the following line:
#org.apache.tomcat.websocket.level = FINE
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector protocol="AJP/1.3"
address="::1"
port="8009"
redirectPort="8443" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>
</Engine>
</Service>
</Server>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary. It is
strongly recommended that you do NOT use one of the users in the commented out
section below since they are intended for use with the examples web
application.
-->
<!--
NOTE: The sample user and role entries below are intended for use with the
examples web application. They are wrapped in a comment and thus are ignored
when reading this file. If you wish to configure these users for use with the
examples web application, do not forget to remove the <!.. ..> that surrounds
them. You will also need to set the passwords to something appropriate.
-->
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
<user username="role1" password="<must-be-changed>" roles="role1"/>
-->
</tomcat-users>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tomcat.apache.org/xml"
xmlns:users="http://tomcat.apache.org/xml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
<xs:element name="tomcat-users">
<xs:complexType>
<xs:sequence>
<xs:element name="role" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="rolename" use="required" type="users:entityname" />
<xs:attribute name="description" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="group" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="groupname" use="required" type="users:entityname" />
<xs:attribute name="description" type="xs:string" />
<xs:attribute name="roles" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="user" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="username" use="required" type="users:entityname" />
<xs:attribute name="fullname" type="xs:string" />
<xs:attribute name="password" type="xs:string" />
<xs:attribute name="roles" type="xs:string" />
<xs:attribute name="groups" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:simpleType name="entityname">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<!-- ======================== Introduction ============================== -->
<!-- This document defines default values for *all* web applications -->
<!-- loaded into this instance of Tomcat. As each application is -->
<!-- deployed, this file is processed, followed by the -->
<!-- "/WEB-INF/web.xml" deployment descriptor from your own -->
<!-- applications. -->
<!-- -->
<!-- WARNING: Do not configure application-specific resources here! -->
<!-- They should go in the "/WEB-INF/web.xml" file in your application. -->
<!-- Set the default request and response character encodings to UTF-8. -->
<request-character-encoding>UTF-8</request-character-encoding>
<response-character-encoding>UTF-8</response-character-encoding>
<!-- ================== Built In Servlet Definitions ==================== -->
<!-- The default servlet for all web applications, that serves static -->
<!-- resources. It processes all requests that are not mapped to other -->
<!-- servlets with servlet mappings (defined either here or in your own -->
<!-- web.xml file). This servlet supports the following initialization -->
<!-- parameters (default values are in square brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. Useful values are 0, 1, and -->
<!-- 11 where higher values mean more detail. [0] -->
<!-- -->
<!-- fileEncoding Encoding to be used to read static resources -->
<!-- [platform default] -->
<!-- -->
<!-- useBomIfPresent If a static file contains a byte order mark -->
<!-- (BOM), should this be used to determine the -->
<!-- file encoding in preference to fileEncoding. -->
<!-- [true] -->
<!-- -->
<!-- input Input buffer size (in bytes) when reading -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- listings Should directory listings be produced if there -->
<!-- is no welcome file in this directory? [false] -->
<!-- WARNING: Listings for directories with many -->
<!-- entries can be slow and may consume -->
<!-- significant proportions of server resources. -->
<!-- -->
<!-- output Output buffer size (in bytes) when writing -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- readonly Is this context "read only", so HTTP -->
<!-- commands like PUT and DELETE are -->
<!-- rejected? [true] -->
<!-- -->
<!-- readmeFile File to display together with the directory -->
<!-- contents. [null] -->
<!-- -->
<!-- sendfileSize If the connector used supports sendfile, this -->
<!-- represents the minimal file size in KB for -->
<!-- which sendfile will be used. Use a negative -->
<!-- value to always disable sendfile. [48] -->
<!-- -->
<!-- useAcceptRanges Should the Accept-Ranges header be included -->
<!-- in responses where appropriate? [true] -->
<!-- -->
<!-- For directory listing customization. Checks localXsltFile, then -->
<!-- globalXsltFile, then defaults to original behavior. -->
<!-- -->
<!-- localXsltFile Make directory listings an XML doc and -->
<!-- pass the result to this style sheet residing -->
<!-- in that directory. This overrides -->
<!-- contextXsltFile and globalXsltFile[null] -->
<!-- -->
<!-- contextXsltFile Make directory listings an XML doc and -->
<!-- pass the result to this style sheet which is -->
<!-- relative to the context root. This overrides -->
<!-- globalXsltFile[null] -->
<!-- -->
<!-- globalXsltFile Site wide configuration version of -->
<!-- localXsltFile. This argument must either be an -->
<!-- absolute or relative (to either -->
<!-- $CATALINA_BASE/conf or $CATALINA_HOME/conf) -->
<!-- path that points to a location below either -->
<!-- $CATALINA_BASE/conf (checked first) or -->
<!-- $CATALINA_HOME/conf (checked second).[null] -->
<!-- -->
<!-- showServerInfo Should server information be presented in the -->
<!-- response sent to clients when directory -->
<!-- listings is enabled? [true] -->
<!-- -->
<!-- allowPartialPut Should the server treat an HTTP PUT request -->
<!-- with a Range header as a partial PUT? Note -->
<!-- that RFC 7233 clarified that Range headers are -->
<!-- only valid for GET requests. [true] -->
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- The JSP page compiler and execution servlet, which is the mechanism -->
<!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
<!-- is mapped to the URL pattern "*.jsp". This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- checkInterval If development is false and checkInterval is -->
<!-- greater than zero, background compilations are -->
<!-- enabled. checkInterval is the time in seconds -->
<!-- between checks to see if a JSP page (and its -->
<!-- dependent files) needs to be recompiled. [0] -->
<!-- -->
<!-- classdebuginfo Should the class file be compiled with -->
<!-- debugging information? [true] -->
<!-- -->
<!-- classpath What class path should I use while compiling -->
<!-- generated servlets? [Created dynamically -->
<!-- based on the current web application] -->
<!-- -->
<!-- compiler Which compiler Ant should use to compile JSP -->
<!-- pages. See the jasper documentation for more -->
<!-- information. -->
<!-- -->
<!-- compilerSourceVM Compiler source VM. [1.8] -->
<!-- -->
<!-- compilerTargetVM Compiler target VM. [1.8] -->
<!-- -->
<!-- development Is Jasper used in development mode? If true, -->
<!-- the frequency at which JSPs are checked for -->
<!-- modification may be specified via the -->
<!-- modificationTestInterval parameter. [true] -->
<!-- -->
<!-- displaySourceFragment -->
<!-- Should a source fragment be included in -->
<!-- exception messages? [true] -->
<!-- -->
<!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
<!-- dumped to a file? [false] -->
<!-- False if suppressSmap is true -->
<!-- -->
<!-- enablePooling Determines whether tag handler pooling is -->
<!-- enabled. This is a compilation option. It will -->
<!-- not alter the behaviour of JSPs that have -->
<!-- already been compiled. [true] -->
<!-- -->
<!-- engineOptionsClass Allows specifying the Options class used to -->
<!-- configure Jasper. If not present, the default -->
<!-- EmbeddedServletOptions will be used. -->
<!-- This option is ignored when running under a -->
<!-- SecurityManager. -->
<!-- -->
<!-- errorOnUseBeanInvalidClassAttribute -->
<!-- Should Jasper issue an error when the value of -->
<!-- the class attribute in an useBean action is -->
<!-- not a valid bean class? [true] -->
<!-- -->
<!-- fork Tell Ant to fork compiles of JSP pages so that -->
<!-- a separate JVM is used for JSP page compiles -->
<!-- from the one Tomcat is running in. [true] -->
<!-- -->
<!-- genStringAsCharArray -->
<!-- Should text strings be generated as char -->
<!-- arrays, to improve performance in some cases? -->
<!-- [false] -->
<!-- -->
<!-- ieClassId The class-id value to be sent to Internet -->
<!-- Explorer when using <jsp:plugin> tags. -->
<!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
<!-- -->
<!-- javaEncoding Java file encoding to use for generating java -->
<!-- source files. [UTF8] -->
<!-- -->
<!-- keepgenerated Should we keep the generated Java source code -->
<!-- for each page instead of deleting it? [true] -->
<!-- -->
<!-- mappedfile Should we generate static content with one -->
<!-- print statement per input line, to ease -->
<!-- debugging? [true] -->
<!-- -->
<!-- maxLoadedJsps The maximum number of JSPs that will be loaded -->
<!-- for a web application. If more than this -->
<!-- number of JSPs are loaded, the least recently -->
<!-- used JSPs will be unloaded so that the number -->
<!-- of JSPs loaded at any one time does not exceed -->
<!-- this limit. A value of zero or less indicates -->
<!-- no limit. [-1] -->
<!-- -->
<!-- jspIdleTimeout The amount of time in seconds a JSP can be -->
<!-- idle before it is unloaded. A value of zero -->
<!-- or less indicates never unload. [-1] -->
<!-- -->
<!-- modificationTestInterval -->
<!-- Causes a JSP (and its dependent files) to not -->
<!-- be checked for modification during the -->
<!-- specified time interval (in seconds) from the -->
<!-- last time the JSP was checked for -->
<!-- modification. A value of 0 will cause the JSP -->
<!-- to be checked on every access. -->
<!-- Used in development mode only. [4] -->
<!-- -->
<!-- recompileOnFail If a JSP compilation fails should the -->
<!-- modificationTestInterval be ignored and the -->
<!-- next access trigger a re-compilation attempt? -->
<!-- Used in development mode only and is disabled -->
<!-- by default as compilation may be expensive and -->
<!-- could lead to excessive resource usage. -->
<!-- [false] -->
<!-- -->
<!-- scratchdir What scratch directory should we use when -->
<!-- compiling JSP pages? [default work directory -->
<!-- for the current web application] -->
<!-- This option is ignored when running under a -->
<!-- SecurityManager. -->
<!-- -->
<!-- suppressSmap Should the generation of SMAP info for JSR45 -->
<!-- debugging be suppressed? [false] -->
<!-- -->
<!-- trimSpaces Should template text that consists entirely of -->
<!-- whitespace be removed from the output (true), -->
<!-- replaced with a single space (single) or left -->
<!-- unchanged (false)? Note that if a JSP page or -->
<!-- tag file specifies a trimDirectiveWhitespaces -->
<!-- value of true, that will take precedence over -->
<!-- this configuration setting for that page/tag. -->
<!-- [false] -->
<!-- -->
<!-- xpoweredBy Determines whether X-Powered-By response -->
<!-- header is added by generated servlet. [false] -->
<!-- -->
<!-- strictQuoteEscaping When scriptlet expressions are used for -->
<!-- attribute values, should the rules in JSP.1.6 -->
<!-- for the escaping of quote characters be -->
<!-- strictly applied? [true] -->
<!-- -->
<!-- quoteAttributeEL When EL is used in an attribute value on a -->
<!-- JSP page should the rules for quoting of -->
<!-- attributes described in JSP.1.6 be applied to -->
<!-- the expression? [true] -->
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<!-- NOTE: An SSI Filter is also available as an alternative SSI -->
<!-- implementation. Use either the Servlet or the Filter but NOT both. -->
<!-- -->
<!-- Server Side Includes processing servlet, which processes SSI -->
<!-- directives in HTML pages consistent with similar support in web -->
<!-- servers like Apache. Traditionally, this servlet is mapped to the -->
<!-- URL pattern "*.shtml". This servlet supports the following -->
<!-- initialization parameters (default values are in square brackets): -->
<!-- -->
<!-- buffered Should output from this servlet be buffered? -->
<!-- (0=false, 1=true) [0] -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- -->
<!-- expires The number of seconds before a page with SSI -->
<!-- directives will expire. [No default] -->
<!-- -->
<!-- isVirtualWebappRelative -->
<!-- Should "virtual" paths be interpreted as -->
<!-- relative to the context root, instead of -->
<!-- the server root? [false] -->
<!-- -->
<!-- inputEncoding The encoding to assume for SSI resources if -->
<!-- one is not available from the resource. -->
<!-- [Platform default] -->
<!-- -->
<!-- outputEncoding The encoding to use for the page that results -->
<!-- from the SSI processing. [UTF-8] -->
<!-- -->
<!-- allowExec Is use of the exec command enabled? [false] -->
<!--
<servlet>
<servlet-name>ssi</servlet-name>
<servlet-class>
org.apache.catalina.ssi.SSIServlet
</servlet-class>
<init-param>
<param-name>buffered</param-name>
<param-value>1</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>expires</param-name>
<param-value>666</param-value>
</init-param>
<init-param>
<param-name>isVirtualWebappRelative</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>4</load-on-startup>
</servlet>
-->
<!-- Common Gateway Includes (CGI) processing servlet, which supports -->
<!-- execution of external applications that conform to the CGI spec -->
<!-- requirements. Typically, this servlet is mapped to the URL pattern -->
<!-- "/cgi-bin/*", which means that any CGI applications that are -->
<!-- executed must be present within the web application. This servlet -->
<!-- supports the following initialization parameters (default values -->
<!-- are in square brackets): -->
<!-- -->
<!-- cgiPathPrefix The CGI search path will start at -->
<!-- webAppRootDir + File.separator + this prefix. -->
<!-- If not set, then webAppRootDir is used. -->
<!-- Recommended value: WEB-INF/cgi -->
<!-- -->
<!-- cmdLineArgumentsDecoded -->
<!-- Only used when enableCmdLineArguments is -->
<!-- true. The pattern that individual decoded -->
<!-- command line arguments must match else the -->
<!-- request will be rejected. This is to -->
<!-- work-around various issues when Java passes -->
<!-- the arguments to the OS. See the CGI How-To -->
<!-- for more details. The default varies by -->
<!-- platform. -->
<!-- Windows: [[a-zA-Z0-9\Q-_.\\/:\E]+] -->
<!-- Others: [.*] -->
<!-- Note that internally the CGI Servlet treats -->
<!-- [.*] as a special case to improve performance -->
<!-- -->
<!-- cmdLineArgumentsEncoded -->
<!-- Only used when enableCmdLineArguments is -->
<!-- true. The pattern that individual encoded -->
<!-- command line arguments must match else the -->
<!-- request will be rejected. The default matches -->
<!-- the allowed values defined by RFC3875. -->
<!-- [[a-zA-Z0-9\Q%;/?:@&,$-_.!~*'()\E]+] -->
<!-- -->
<!-- enableCmdLineArguments -->
<!-- Are command line parameters generated from -->
<!-- the query string as per section 4.4 of 3875 -->
<!-- RFC? [false] -->
<!-- -->
<!-- executable Name of the executable used to run the -->
<!-- script. [perl] -->
<!-- -->
<!-- envHttpHeaders A regular expression used to select the HTTP -->
<!-- headers passed to the CGI process as -->
<!-- environment variables. Note that headers are -->
<!-- converted to upper case before matching and -->
<!-- that the entire header name must match the -->
<!-- pattern. -->
<!-- [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")] -->
<!-- -->
<!-- passShellEnvironment Should the shell environment variables (if -->
<!-- any) be passed to the CGI script? [false] -->
<!-- -->
<!-- stderrTimeout The time (in milliseconds) to wait for the -->
<!-- reading of stderr to complete before -->
<!-- terminating the CGI process. [2000] -->
<!--
<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
-->
<!-- ================ Built In Servlet Mappings ========================= -->
<!-- The servlet mappings for the built in servlets defined above. Note -->
<!-- that, by default, the CGI and SSI servlets are *not* mapped. You -->
<!-- must uncomment these mappings (or add them to your application's own -->
<!-- web.xml deployment descriptor) to enable these services -->
<!-- The mapping for the default servlet -->
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- The mappings for the JSP servlet -->
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<!-- The mapping for the SSI servlet -->
<!--
<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
-->
<!-- The mapping for the CGI Gateway servlet -->
<!--
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi-bin/*</url-pattern>
</servlet-mapping>
-->
<!-- ================== Built In Filter Definitions ===================== -->
<!-- A filter that sets various security related HTTP Response headers. -->
<!-- This filter supports the following initialization parameters -->
<!-- (default values are in square brackets): -->
<!-- -->
<!-- hstsEnabled Should the HTTP Strict Transport Security -->
<!-- (HSTS) header be added to the response? See -->
<!-- RFC 6797 for more information on HSTS. [true] -->
<!-- -->
<!-- hstsMaxAgeSeconds The max age value that should be used in the -->
<!-- HSTS header. Negative values will be treated -->
<!-- as zero. [0] -->
<!-- -->
<!-- hstsIncludeSubDomains -->
<!-- Should the includeSubDomains parameter be -->
<!-- included in the HSTS header. -->
<!-- -->
<!-- antiClickJackingEnabled -->
<!-- Should the anti click-jacking header -->
<!-- X-Frame-Options be added to every response? -->
<!-- [true] -->
<!-- -->
<!-- antiClickJackingOption -->
<!-- What value should be used for the header. Must -->
<!-- be one of DENY, SAMEORIGIN, ALLOW-FROM -->
<!-- (case-insensitive). [DENY] -->
<!-- -->
<!-- antiClickJackingUri IF ALLOW-FROM is used, what URI should be -->
<!-- allowed? [] -->
<!-- -->
<!-- blockContentTypeSniffingEnabled -->
<!-- Should the header that blocks content type -->
<!-- sniffing be added to every response? [true] -->
<!--
<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<async-supported>true</async-supported>
</filter>
-->
<!-- A filter that sets character encoding that is used to decode -->
<!-- parameters in a POST request -->
<!--
<filter>
<filter-name>setCharacterEncodingFilter</filter-name>
<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<async-supported>true</async-supported>
</filter>
-->
<!-- A filter that triggers request parameters parsing and rejects the -->
<!-- request if some parameters were skipped because of parsing errors or -->
<!-- request size limitations. -->
<!--
<filter>
<filter-name>failedRequestFilter</filter-name>
<filter-class>
org.apache.catalina.filters.FailedRequestFilter
</filter-class>
<async-supported>true</async-supported>
</filter>
-->
<!-- NOTE: An SSI Servlet is also available as an alternative SSI -->
<!-- implementation. Use either the Servlet or the Filter but NOT both. -->
<!-- -->
<!-- Server Side Includes processing filter, which processes SSI -->
<!-- directives in HTML pages consistent with similar support in web -->
<!-- servers like Apache. Traditionally, this filter is mapped to the -->
<!-- URL pattern "*.shtml", though it can be mapped to "*" as it will -->
<!-- selectively enable/disable SSI processing based on mime types. For -->
<!-- this to work you will need to uncomment the .shtml mime type -->
<!-- definition towards the bottom of this file. -->
<!-- The contentType init param allows you to apply SSI processing to JSP -->
<!-- pages, javascript, or any other content you wish. This filter -->
<!-- supports the following initialization parameters (default values are -->
<!-- in square brackets): -->
<!-- -->
<!-- contentType A regex pattern that must be matched before -->
<!-- SSI processing is applied. -->
<!-- [text/x-server-parsed-html(;.*)?] -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- -->
<!-- expires The number of seconds before a page with SSI -->
<!-- directives will expire. [No default] -->
<!-- -->
<!-- isVirtualWebappRelative -->
<!-- Should "virtual" paths be interpreted as -->
<!-- relative to the context root, instead of -->
<!-- the server root? [false] -->
<!-- -->
<!-- allowExec Is use of the exec command enabled? [false] -->
<!--
<filter>
<filter-name>ssi</filter-name>
<filter-class>
org.apache.catalina.ssi.SSIFilter
</filter-class>
<init-param>
<param-name>contentType</param-name>
<param-value>text/x-server-parsed-html(;.*)?</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>expires</param-name>
<param-value>666</param-value>
</init-param>
<init-param>
<param-name>isVirtualWebappRelative</param-name>
<param-value>false</param-value>
</init-param>
</filter>
-->
<!-- ==================== Built In Filter Mappings ====================== -->
<!-- The mapping for the HTTP header security Filter -->
<!--
<filter-mapping>
<filter-name>httpHeaderSecurity</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
-->
<!-- The mapping for the Set Character Encoding Filter -->
<!--
<filter-mapping>
<filter-name>setCharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<!-- The mapping for the Failed Request Filter -->
<!--
<filter-mapping>
<filter-name>failedRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<!-- The mapping for the SSI Filter -->
<!--
<filter-mapping>
<filter-name>ssi</filter-name>
<url-pattern>*.shtml</url-pattern>
</filter-mapping>
-->
<!-- ==================== Default Session Configuration ================= -->
<!-- You can set the default session timeout (in minutes) for all newly -->
<!-- created sessions by modifying the value below. -->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- ===================== Default MIME Type Mappings =================== -->
<!-- When serving static resources, Tomcat will automatically generate -->
<!-- a "Content-Type" header based on the resource's filename extension, -->
<!-- based on these mappings. Additional mappings can be added here (to -->
<!-- apply to all web applications), or in your own application's web.xml -->
<!-- deployment descriptor. -->
<!-- Note: Extensions are always matched in a case-insensitive manner. -->
<mime-mapping>
<extension>123</extension>
<mime-type>application/vnd.lotus-1-2-3</mime-type>
</mime-mapping>
<mime-mapping>
<extension>3dml</extension>
<mime-type>text/vnd.in3d.3dml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>3ds</extension>
<mime-type>image/x-3ds</mime-type>
</mime-mapping>
<mime-mapping>
<extension>3g2</extension>
<mime-type>video/3gpp2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>3gp</extension>
<mime-type>video/3gpp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>7z</extension>
<mime-type>application/x-7z-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aab</extension>
<mime-type>application/x-authorware-bin</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aac</extension>
<mime-type>audio/x-aac</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aam</extension>
<mime-type>application/x-authorware-map</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aas</extension>
<mime-type>application/x-authorware-seg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>abs</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>abw</extension>
<mime-type>application/x-abiword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ac</extension>
<mime-type>application/pkix-attr-cert</mime-type>
</mime-mapping>
<mime-mapping>
<extension>acc</extension>
<mime-type>application/vnd.americandynamics.acc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ace</extension>
<mime-type>application/x-ace-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>acu</extension>
<mime-type>application/vnd.acucobol</mime-type>
</mime-mapping>
<mime-mapping>
<extension>acutc</extension>
<mime-type>application/vnd.acucorp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>adp</extension>
<mime-type>audio/adpcm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aep</extension>
<mime-type>application/vnd.audiograph</mime-type>
</mime-mapping>
<mime-mapping>
<extension>afm</extension>
<mime-type>application/x-font-type1</mime-type>
</mime-mapping>
<mime-mapping>
<extension>afp</extension>
<mime-type>application/vnd.ibm.modcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ahead</extension>
<mime-type>application/vnd.ahead.space</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ai</extension>
<mime-type>application/postscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aif</extension>
<mime-type>audio/x-aiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aifc</extension>
<mime-type>audio/x-aiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aiff</extension>
<mime-type>audio/x-aiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aim</extension>
<mime-type>application/x-aim</mime-type>
</mime-mapping>
<mime-mapping>
<extension>air</extension>
<mime-type>application/vnd.adobe.air-application-installer-package+zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ait</extension>
<mime-type>application/vnd.dvb.ait</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ami</extension>
<mime-type>application/vnd.amiga.ami</mime-type>
</mime-mapping>
<mime-mapping>
<extension>anx</extension>
<mime-type>application/annodex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>apk</extension>
<mime-type>application/vnd.android.package-archive</mime-type>
</mime-mapping>
<mime-mapping>
<extension>appcache</extension>
<mime-type>text/cache-manifest</mime-type>
</mime-mapping>
<mime-mapping>
<extension>application</extension>
<mime-type>application/x-ms-application</mime-type>
</mime-mapping>
<mime-mapping>
<extension>apr</extension>
<mime-type>application/vnd.lotus-approach</mime-type>
</mime-mapping>
<mime-mapping>
<extension>arc</extension>
<mime-type>application/x-freearc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>art</extension>
<mime-type>image/x-jg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>asc</extension>
<mime-type>application/pgp-signature</mime-type>
</mime-mapping>
<mime-mapping>
<extension>asf</extension>
<mime-type>video/x-ms-asf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>asm</extension>
<mime-type>text/x-asm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aso</extension>
<mime-type>application/vnd.accpac.simply.aso</mime-type>
</mime-mapping>
<mime-mapping>
<extension>asx</extension>
<mime-type>video/x-ms-asf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>atc</extension>
<mime-type>application/vnd.acucorp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>atom</extension>
<mime-type>application/atom+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>atomcat</extension>
<mime-type>application/atomcat+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>atomsvc</extension>
<mime-type>application/atomsvc+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>atx</extension>
<mime-type>application/vnd.antix.game-component</mime-type>
</mime-mapping>
<mime-mapping>
<extension>au</extension>
<mime-type>audio/basic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>avi</extension>
<mime-type>video/x-msvideo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>avx</extension>
<mime-type>video/x-rad-screenplay</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aw</extension>
<mime-type>application/applixware</mime-type>
</mime-mapping>
<mime-mapping>
<extension>axa</extension>
<mime-type>audio/annodex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>axv</extension>
<mime-type>video/annodex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>azf</extension>
<mime-type>application/vnd.airzip.filesecure.azf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>azs</extension>
<mime-type>application/vnd.airzip.filesecure.azs</mime-type>
</mime-mapping>
<mime-mapping>
<extension>azw</extension>
<mime-type>application/vnd.amazon.ebook</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bat</extension>
<mime-type>application/x-msdownload</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bcpio</extension>
<mime-type>application/x-bcpio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bdf</extension>
<mime-type>application/x-font-bdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bdm</extension>
<mime-type>application/vnd.syncml.dm+wbxml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bed</extension>
<mime-type>application/vnd.realvnc.bed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bh2</extension>
<mime-type>application/vnd.fujitsu.oasysprs</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bin</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>blb</extension>
<mime-type>application/x-blorb</mime-type>
</mime-mapping>
<mime-mapping>
<extension>blorb</extension>
<mime-type>application/x-blorb</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bmi</extension>
<mime-type>application/vnd.bmi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bmp</extension>
<mime-type>image/bmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>body</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>book</extension>
<mime-type>application/vnd.framemaker</mime-type>
</mime-mapping>
<mime-mapping>
<extension>box</extension>
<mime-type>application/vnd.previewsystems.box</mime-type>
</mime-mapping>
<mime-mapping>
<extension>boz</extension>
<mime-type>application/x-bzip2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bpk</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>btif</extension>
<mime-type>image/prs.btif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bz</extension>
<mime-type>application/x-bzip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bz2</extension>
<mime-type>application/x-bzip2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c11amc</extension>
<mime-type>application/vnd.cluetrust.cartomobile-config</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c11amz</extension>
<mime-type>application/vnd.cluetrust.cartomobile-config-pkg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c4d</extension>
<mime-type>application/vnd.clonk.c4group</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c4f</extension>
<mime-type>application/vnd.clonk.c4group</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c4g</extension>
<mime-type>application/vnd.clonk.c4group</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c4p</extension>
<mime-type>application/vnd.clonk.c4group</mime-type>
</mime-mapping>
<mime-mapping>
<extension>c4u</extension>
<mime-type>application/vnd.clonk.c4group</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cab</extension>
<mime-type>application/vnd.ms-cab-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>caf</extension>
<mime-type>audio/x-caf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cap</extension>
<mime-type>application/vnd.tcpdump.pcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>car</extension>
<mime-type>application/vnd.curl.car</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cat</extension>
<mime-type>application/vnd.ms-pki.seccat</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cb7</extension>
<mime-type>application/x-cbr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cba</extension>
<mime-type>application/x-cbr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cbr</extension>
<mime-type>application/x-cbr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cbt</extension>
<mime-type>application/x-cbr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cbz</extension>
<mime-type>application/x-cbr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cc</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cct</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ccxml</extension>
<mime-type>application/ccxml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdbcmsg</extension>
<mime-type>application/vnd.contact.cmsg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdf</extension>
<mime-type>application/x-cdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdkey</extension>
<mime-type>application/vnd.mediastation.cdkey</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdmia</extension>
<mime-type>application/cdmi-capability</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdmic</extension>
<mime-type>application/cdmi-container</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdmid</extension>
<mime-type>application/cdmi-domain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdmio</extension>
<mime-type>application/cdmi-object</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdmiq</extension>
<mime-type>application/cdmi-queue</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdx</extension>
<mime-type>chemical/x-cdx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdxml</extension>
<mime-type>application/vnd.chemdraw+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdy</extension>
<mime-type>application/vnd.cinderella</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cer</extension>
<mime-type>application/pkix-cert</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cfs</extension>
<mime-type>application/x-cfs-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cgm</extension>
<mime-type>image/cgm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>chat</extension>
<mime-type>application/x-chat</mime-type>
</mime-mapping>
<mime-mapping>
<extension>chm</extension>
<mime-type>application/vnd.ms-htmlhelp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>chrt</extension>
<mime-type>application/vnd.kde.kchart</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cif</extension>
<mime-type>chemical/x-cif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cii</extension>
<mime-type>application/vnd.anser-web-certificate-issue-initiation</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cil</extension>
<mime-type>application/vnd.ms-artgalry</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cla</extension>
<mime-type>application/vnd.claymore</mime-type>
</mime-mapping>
<mime-mapping>
<extension>class</extension>
<mime-type>application/java</mime-type>
</mime-mapping>
<mime-mapping>
<extension>clkk</extension>
<mime-type>application/vnd.crick.clicker.keyboard</mime-type>
</mime-mapping>
<mime-mapping>
<extension>clkp</extension>
<mime-type>application/vnd.crick.clicker.palette</mime-type>
</mime-mapping>
<mime-mapping>
<extension>clkt</extension>
<mime-type>application/vnd.crick.clicker.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>clkw</extension>
<mime-type>application/vnd.crick.clicker.wordbank</mime-type>
</mime-mapping>
<mime-mapping>
<extension>clkx</extension>
<mime-type>application/vnd.crick.clicker</mime-type>
</mime-mapping>
<mime-mapping>
<extension>clp</extension>
<mime-type>application/x-msclip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cmc</extension>
<mime-type>application/vnd.cosmocaller</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cmdf</extension>
<mime-type>chemical/x-cmdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cml</extension>
<mime-type>chemical/x-cml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cmp</extension>
<mime-type>application/vnd.yellowriver-custom-menu</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cmx</extension>
<mime-type>image/x-cmx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cod</extension>
<mime-type>application/vnd.rim.cod</mime-type>
</mime-mapping>
<mime-mapping>
<extension>com</extension>
<mime-type>application/x-msdownload</mime-type>
</mime-mapping>
<mime-mapping>
<extension>conf</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cpio</extension>
<mime-type>application/x-cpio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cpp</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cpt</extension>
<mime-type>application/mac-compactpro</mime-type>
</mime-mapping>
<mime-mapping>
<extension>crd</extension>
<mime-type>application/x-mscardfile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>crl</extension>
<mime-type>application/pkix-crl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>crt</extension>
<mime-type>application/x-x509-ca-cert</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cryptonote</extension>
<mime-type>application/vnd.rig.cryptonote</mime-type>
</mime-mapping>
<mime-mapping>
<extension>csh</extension>
<mime-type>application/x-csh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>csml</extension>
<mime-type>chemical/x-csml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>csp</extension>
<mime-type>application/vnd.commonspace</mime-type>
</mime-mapping>
<mime-mapping>
<extension>css</extension>
<mime-type>text/css</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cst</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>csv</extension>
<mime-type>text/csv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cu</extension>
<mime-type>application/cu-seeme</mime-type>
</mime-mapping>
<mime-mapping>
<extension>curl</extension>
<mime-type>text/vnd.curl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cww</extension>
<mime-type>application/prs.cww</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cxt</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cxx</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dae</extension>
<mime-type>model/vnd.collada+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>daf</extension>
<mime-type>application/vnd.mobius.daf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dart</extension>
<mime-type>application/vnd.dart</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dataless</extension>
<mime-type>application/vnd.fdsn.seed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>davmount</extension>
<mime-type>application/davmount+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dbk</extension>
<mime-type>application/docbook+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dcr</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dcurl</extension>
<mime-type>text/vnd.curl.dcurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dd2</extension>
<mime-type>application/vnd.oma.dd2+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ddd</extension>
<mime-type>application/vnd.fujixerox.ddd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>deb</extension>
<mime-type>application/x-debian-package</mime-type>
</mime-mapping>
<mime-mapping>
<extension>def</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>deploy</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>der</extension>
<mime-type>application/x-x509-ca-cert</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dfac</extension>
<mime-type>application/vnd.dreamfactory</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dgc</extension>
<mime-type>application/x-dgc-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dib</extension>
<mime-type>image/bmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dic</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dir</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dis</extension>
<mime-type>application/vnd.mobius.dis</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dist</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>distz</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>djv</extension>
<mime-type>image/vnd.djvu</mime-type>
</mime-mapping>
<mime-mapping>
<extension>djvu</extension>
<mime-type>image/vnd.djvu</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dll</extension>
<mime-type>application/x-msdownload</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dmg</extension>
<mime-type>application/x-apple-diskimage</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dmp</extension>
<mime-type>application/vnd.tcpdump.pcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dms</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dna</extension>
<mime-type>application/vnd.dna</mime-type>
</mime-mapping>
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>docm</extension>
<mime-type>application/vnd.ms-word.document.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>docx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dot</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dotm</extension>
<mime-type>application/vnd.ms-word.template.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dotx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dp</extension>
<mime-type>application/vnd.osgi.dp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dpg</extension>
<mime-type>application/vnd.dpgraph</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dra</extension>
<mime-type>audio/vnd.dra</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dsc</extension>
<mime-type>text/prs.lines.tag</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dssc</extension>
<mime-type>application/dssc+der</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dtb</extension>
<mime-type>application/x-dtbook+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dtd</extension>
<mime-type>application/xml-dtd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dts</extension>
<mime-type>audio/vnd.dts</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dtshd</extension>
<mime-type>audio/vnd.dts.hd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dump</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dv</extension>
<mime-type>video/x-dv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dvb</extension>
<mime-type>video/vnd.dvb.file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dvi</extension>
<mime-type>application/x-dvi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dwf</extension>
<mime-type>model/vnd.dwf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dwg</extension>
<mime-type>image/vnd.dwg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dxf</extension>
<mime-type>image/vnd.dxf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dxp</extension>
<mime-type>application/vnd.spotfire.dxp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dxr</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ecelp4800</extension>
<mime-type>audio/vnd.nuera.ecelp4800</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ecelp7470</extension>
<mime-type>audio/vnd.nuera.ecelp7470</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ecelp9600</extension>
<mime-type>audio/vnd.nuera.ecelp9600</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ecma</extension>
<mime-type>application/ecmascript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>edm</extension>
<mime-type>application/vnd.novadigm.edm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>edx</extension>
<mime-type>application/vnd.novadigm.edx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>efif</extension>
<mime-type>application/vnd.picsel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ei6</extension>
<mime-type>application/vnd.pg.osasli</mime-type>
</mime-mapping>
<mime-mapping>
<extension>elc</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>emf</extension>
<mime-type>application/x-msmetafile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eml</extension>
<mime-type>message/rfc822</mime-type>
</mime-mapping>
<mime-mapping>
<extension>emma</extension>
<mime-type>application/emma+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>emz</extension>
<mime-type>application/x-msmetafile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eol</extension>
<mime-type>audio/vnd.digital-winds</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eps</extension>
<mime-type>application/postscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>epub</extension>
<mime-type>application/epub+zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>es3</extension>
<mime-type>application/vnd.eszigno3+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>esa</extension>
<mime-type>application/vnd.osgi.subsystem</mime-type>
</mime-mapping>
<mime-mapping>
<extension>esf</extension>
<mime-type>application/vnd.epson.esf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>et3</extension>
<mime-type>application/vnd.eszigno3+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>etx</extension>
<mime-type>text/x-setext</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eva</extension>
<mime-type>application/x-eva</mime-type>
</mime-mapping>
<mime-mapping>
<extension>evy</extension>
<mime-type>application/x-envoy</mime-type>
</mime-mapping>
<mime-mapping>
<extension>exe</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>exi</extension>
<mime-type>application/exi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ext</extension>
<mime-type>application/vnd.novadigm.ext</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ez</extension>
<mime-type>application/andrew-inset</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ez2</extension>
<mime-type>application/vnd.ezpix-album</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ez3</extension>
<mime-type>application/vnd.ezpix-package</mime-type>
</mime-mapping>
<mime-mapping>
<extension>f</extension>
<mime-type>text/x-fortran</mime-type>
</mime-mapping>
<mime-mapping>
<extension>f4v</extension>
<mime-type>video/x-f4v</mime-type>
</mime-mapping>
<mime-mapping>
<extension>f77</extension>
<mime-type>text/x-fortran</mime-type>
</mime-mapping>
<mime-mapping>
<extension>f90</extension>
<mime-type>text/x-fortran</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fbs</extension>
<mime-type>image/vnd.fastbidsheet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fcdt</extension>
<mime-type>application/vnd.adobe.formscentral.fcdt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fcs</extension>
<mime-type>application/vnd.isac.fcs</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fdf</extension>
<mime-type>application/vnd.fdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fe_launch</extension>
<mime-type>application/vnd.denovo.fcselayout-link</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fg5</extension>
<mime-type>application/vnd.fujitsu.oasysgp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fgd</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fh</extension>
<mime-type>image/x-freehand</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fh4</extension>
<mime-type>image/x-freehand</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fh5</extension>
<mime-type>image/x-freehand</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fh7</extension>
<mime-type>image/x-freehand</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fhc</extension>
<mime-type>image/x-freehand</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fig</extension>
<mime-type>application/x-xfig</mime-type>
</mime-mapping>
<mime-mapping>
<extension>flac</extension>
<mime-type>audio/flac</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fli</extension>
<mime-type>video/x-fli</mime-type>
</mime-mapping>
<mime-mapping>
<extension>flo</extension>
<mime-type>application/vnd.micrografx.flo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>flv</extension>
<mime-type>video/x-flv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>flw</extension>
<mime-type>application/vnd.kde.kivio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>flx</extension>
<mime-type>text/vnd.fmi.flexstor</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fly</extension>
<mime-type>text/vnd.fly</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fm</extension>
<mime-type>application/vnd.framemaker</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fnc</extension>
<mime-type>application/vnd.frogans.fnc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>for</extension>
<mime-type>text/x-fortran</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fpx</extension>
<mime-type>image/vnd.fpx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>frame</extension>
<mime-type>application/vnd.framemaker</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fsc</extension>
<mime-type>application/vnd.fsc.weblaunch</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fst</extension>
<mime-type>image/vnd.fst</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ftc</extension>
<mime-type>application/vnd.fluxtime.clip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fti</extension>
<mime-type>application/vnd.anser-web-funds-transfer-initiation</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fvt</extension>
<mime-type>video/vnd.fvt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fxp</extension>
<mime-type>application/vnd.adobe.fxp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fxpl</extension>
<mime-type>application/vnd.adobe.fxp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>fzs</extension>
<mime-type>application/vnd.fuzzysheet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>g2w</extension>
<mime-type>application/vnd.geoplan</mime-type>
</mime-mapping>
<mime-mapping>
<extension>g3</extension>
<mime-type>image/g3fax</mime-type>
</mime-mapping>
<mime-mapping>
<extension>g3w</extension>
<mime-type>application/vnd.geospace</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gac</extension>
<mime-type>application/vnd.groove-account</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gam</extension>
<mime-type>application/x-tads</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gbr</extension>
<mime-type>application/rpki-ghostbusters</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gca</extension>
<mime-type>application/x-gca-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gdl</extension>
<mime-type>model/vnd.gdl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>geo</extension>
<mime-type>application/vnd.dynageo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gex</extension>
<mime-type>application/vnd.geometry-explorer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ggb</extension>
<mime-type>application/vnd.geogebra.file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ggt</extension>
<mime-type>application/vnd.geogebra.tool</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ghf</extension>
<mime-type>application/vnd.groove-help</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gif</extension>
<mime-type>image/gif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gim</extension>
<mime-type>application/vnd.groove-identity-message</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gml</extension>
<mime-type>application/gml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gmx</extension>
<mime-type>application/vnd.gmx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gnumeric</extension>
<mime-type>application/x-gnumeric</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gph</extension>
<mime-type>application/vnd.flographit</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gpx</extension>
<mime-type>application/gpx+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gqf</extension>
<mime-type>application/vnd.grafeq</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gqs</extension>
<mime-type>application/vnd.grafeq</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gram</extension>
<mime-type>application/srgs</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gramps</extension>
<mime-type>application/x-gramps-xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gre</extension>
<mime-type>application/vnd.geometry-explorer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>grv</extension>
<mime-type>application/vnd.groove-injector</mime-type>
</mime-mapping>
<mime-mapping>
<extension>grxml</extension>
<mime-type>application/srgs+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gsf</extension>
<mime-type>application/x-font-ghostscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gtar</extension>
<mime-type>application/x-gtar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gtm</extension>
<mime-type>application/vnd.groove-tool-message</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gtw</extension>
<mime-type>model/vnd.gtw</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gv</extension>
<mime-type>text/vnd.graphviz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gxf</extension>
<mime-type>application/gxf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gxt</extension>
<mime-type>application/vnd.geonext</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gz</extension>
<mime-type>application/x-gzip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>h</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>h261</extension>
<mime-type>video/h261</mime-type>
</mime-mapping>
<mime-mapping>
<extension>h263</extension>
<mime-type>video/h263</mime-type>
</mime-mapping>
<mime-mapping>
<extension>h264</extension>
<mime-type>video/h264</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hal</extension>
<mime-type>application/vnd.hal+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hbci</extension>
<mime-type>application/vnd.hbci</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hdf</extension>
<mime-type>application/x-hdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hh</extension>
<mime-type>text/x-c</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hlp</extension>
<mime-type>application/winhlp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hpgl</extension>
<mime-type>application/vnd.hp-hpgl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hpid</extension>
<mime-type>application/vnd.hp-hpid</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hps</extension>
<mime-type>application/vnd.hp-hps</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hqx</extension>
<mime-type>application/mac-binhex40</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htc</extension>
<mime-type>text/x-component</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htke</extension>
<mime-type>application/vnd.kenameaapp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hvd</extension>
<mime-type>application/vnd.yamaha.hv-dic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hvp</extension>
<mime-type>application/vnd.yamaha.hv-voice</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hvs</extension>
<mime-type>application/vnd.yamaha.hv-script</mime-type>
</mime-mapping>
<mime-mapping>
<extension>i2g</extension>
<mime-type>application/vnd.intergeo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>icc</extension>
<mime-type>application/vnd.iccprofile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ice</extension>
<mime-type>x-conference/x-cooltalk</mime-type>
</mime-mapping>
<mime-mapping>
<extension>icm</extension>
<mime-type>application/vnd.iccprofile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ico</extension>
<mime-type>image/x-icon</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ics</extension>
<mime-type>text/calendar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ief</extension>
<mime-type>image/ief</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ifb</extension>
<mime-type>text/calendar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ifm</extension>
<mime-type>application/vnd.shana.informed.formdata</mime-type>
</mime-mapping>
<mime-mapping>
<extension>iges</extension>
<mime-type>model/iges</mime-type>
</mime-mapping>
<mime-mapping>
<extension>igl</extension>
<mime-type>application/vnd.igloader</mime-type>
</mime-mapping>
<mime-mapping>
<extension>igm</extension>
<mime-type>application/vnd.insors.igm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>igs</extension>
<mime-type>model/iges</mime-type>
</mime-mapping>
<mime-mapping>
<extension>igx</extension>
<mime-type>application/vnd.micrografx.igx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>iif</extension>
<mime-type>application/vnd.shana.informed.interchange</mime-type>
</mime-mapping>
<mime-mapping>
<extension>imp</extension>
<mime-type>application/vnd.accpac.simply.imp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ims</extension>
<mime-type>application/vnd.ms-ims</mime-type>
</mime-mapping>
<mime-mapping>
<extension>in</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ink</extension>
<mime-type>application/inkml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>inkml</extension>
<mime-type>application/inkml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>install</extension>
<mime-type>application/x-install-instructions</mime-type>
</mime-mapping>
<mime-mapping>
<extension>iota</extension>
<mime-type>application/vnd.astraea-software.iota</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ipfix</extension>
<mime-type>application/ipfix</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ipk</extension>
<mime-type>application/vnd.shana.informed.package</mime-type>
</mime-mapping>
<mime-mapping>
<extension>irm</extension>
<mime-type>application/vnd.ibm.rights-management</mime-type>
</mime-mapping>
<mime-mapping>
<extension>irp</extension>
<mime-type>application/vnd.irepository.package+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>iso</extension>
<mime-type>application/x-iso9660-image</mime-type>
</mime-mapping>
<mime-mapping>
<extension>itp</extension>
<mime-type>application/vnd.shana.informed.formtemplate</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ivp</extension>
<mime-type>application/vnd.immervision-ivp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ivu</extension>
<mime-type>application/vnd.immervision-ivu</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jad</extension>
<mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jam</extension>
<mime-type>application/vnd.jam</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jar</extension>
<mime-type>application/java-archive</mime-type>
</mime-mapping>
<mime-mapping>
<extension>java</extension>
<mime-type>text/x-java-source</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jisp</extension>
<mime-type>application/vnd.jisp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jlt</extension>
<mime-type>application/vnd.hp-jlyt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jnlp</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>joda</extension>
<mime-type>application/vnd.joost.joda-archive</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpe</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpeg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpgm</extension>
<mime-type>video/jpm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpgv</extension>
<mime-type>video/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpm</extension>
<mime-type>video/jpm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>js</extension>
<mime-type>application/javascript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jsf</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>json</extension>
<mime-type>application/json</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jsonml</extension>
<mime-type>application/jsonml+json</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jspf</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kar</extension>
<mime-type>audio/midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>karbon</extension>
<mime-type>application/vnd.kde.karbon</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kfo</extension>
<mime-type>application/vnd.kde.kformula</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kia</extension>
<mime-type>application/vnd.kidspiration</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kml</extension>
<mime-type>application/vnd.google-earth.kml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kmz</extension>
<mime-type>application/vnd.google-earth.kmz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kne</extension>
<mime-type>application/vnd.kinar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>knp</extension>
<mime-type>application/vnd.kinar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kon</extension>
<mime-type>application/vnd.kde.kontour</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kpr</extension>
<mime-type>application/vnd.kde.kpresenter</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kpt</extension>
<mime-type>application/vnd.kde.kpresenter</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kpxx</extension>
<mime-type>application/vnd.ds-keypoint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ksp</extension>
<mime-type>application/vnd.kde.kspread</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ktr</extension>
<mime-type>application/vnd.kahootz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ktx</extension>
<mime-type>image/ktx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ktz</extension>
<mime-type>application/vnd.kahootz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kwd</extension>
<mime-type>application/vnd.kde.kword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kwt</extension>
<mime-type>application/vnd.kde.kword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lasxml</extension>
<mime-type>application/vnd.las.las+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>latex</extension>
<mime-type>application/x-latex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lbd</extension>
<mime-type>application/vnd.llamagraphics.life-balance.desktop</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lbe</extension>
<mime-type>application/vnd.llamagraphics.life-balance.exchange+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>les</extension>
<mime-type>application/vnd.hhe.lesson-player</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lha</extension>
<mime-type>application/x-lzh-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>link66</extension>
<mime-type>application/vnd.route66.link66+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>list</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>list3820</extension>
<mime-type>application/vnd.ibm.modcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>listafp</extension>
<mime-type>application/vnd.ibm.modcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lnk</extension>
<mime-type>application/x-ms-shortcut</mime-type>
</mime-mapping>
<mime-mapping>
<extension>log</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lostxml</extension>
<mime-type>application/lost+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lrf</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lrm</extension>
<mime-type>application/vnd.ms-lrm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ltf</extension>
<mime-type>application/vnd.frogans.ltf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lvp</extension>
<mime-type>audio/vnd.lucent.voice</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lwp</extension>
<mime-type>application/vnd.lotus-wordpro</mime-type>
</mime-mapping>
<mime-mapping>
<extension>lzh</extension>
<mime-type>application/x-lzh-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m13</extension>
<mime-type>application/x-msmediaview</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m14</extension>
<mime-type>application/x-msmediaview</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m1v</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m21</extension>
<mime-type>application/mp21</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m2a</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m2v</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m3a</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m3u</extension>
<mime-type>audio/x-mpegurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m3u8</extension>
<mime-type>application/vnd.apple.mpegurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m4a</extension>
<mime-type>audio/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m4b</extension>
<mime-type>audio/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m4r</extension>
<mime-type>audio/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m4u</extension>
<mime-type>video/vnd.mpegurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m4v</extension>
<mime-type>video/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ma</extension>
<mime-type>application/mathematica</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mac</extension>
<mime-type>image/x-macpaint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mads</extension>
<mime-type>application/mads+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mag</extension>
<mime-type>application/vnd.ecowin.chart</mime-type>
</mime-mapping>
<mime-mapping>
<extension>maker</extension>
<mime-type>application/vnd.framemaker</mime-type>
</mime-mapping>
<mime-mapping>
<extension>man</extension>
<mime-type>text/troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mar</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mathml</extension>
<mime-type>application/mathml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mb</extension>
<mime-type>application/mathematica</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mbk</extension>
<mime-type>application/vnd.mobius.mbk</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mbox</extension>
<mime-type>application/mbox</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mc1</extension>
<mime-type>application/vnd.medcalcdata</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mcd</extension>
<mime-type>application/vnd.mcd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mcurl</extension>
<mime-type>text/vnd.curl.mcurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mdb</extension>
<mime-type>application/x-msaccess</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mdi</extension>
<mime-type>image/vnd.ms-modi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>me</extension>
<mime-type>text/troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mesh</extension>
<mime-type>model/mesh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>meta4</extension>
<mime-type>application/metalink4+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>metalink</extension>
<mime-type>application/metalink+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mets</extension>
<mime-type>application/mets+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mfm</extension>
<mime-type>application/vnd.mfmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mft</extension>
<mime-type>application/rpki-manifest</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mgp</extension>
<mime-type>application/vnd.osgeo.mapguide.package</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mgz</extension>
<mime-type>application/vnd.proteus.magazine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mid</extension>
<mime-type>audio/midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>midi</extension>
<mime-type>audio/midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mie</extension>
<mime-type>application/x-mie</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mif</extension>
<mime-type>application/x-mif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mime</extension>
<mime-type>message/rfc822</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mj2</extension>
<mime-type>video/mj2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mjp2</extension>
<mime-type>video/mj2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mk3d</extension>
<mime-type>video/x-matroska</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mka</extension>
<mime-type>audio/x-matroska</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mks</extension>
<mime-type>video/x-matroska</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mkv</extension>
<mime-type>video/x-matroska</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mlp</extension>
<mime-type>application/vnd.dolby.mlp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mmd</extension>
<mime-type>application/vnd.chipnuts.karaoke-mmd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mmf</extension>
<mime-type>application/vnd.smaf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mmr</extension>
<mime-type>image/vnd.fujixerox.edmics-mmr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mng</extension>
<mime-type>video/x-mng</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mny</extension>
<mime-type>application/x-msmoney</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mobi</extension>
<mime-type>application/x-mobipocket-ebook</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mods</extension>
<mime-type>application/mods+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mov</extension>
<mime-type>video/quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>movie</extension>
<mime-type>video/x-sgi-movie</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp1</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp2</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp21</extension>
<mime-type>application/mp21</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp2a</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp3</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp4</extension>
<mime-type>video/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp4a</extension>
<mime-type>audio/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp4s</extension>
<mime-type>application/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp4v</extension>
<mime-type>video/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpa</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpc</extension>
<mime-type>application/vnd.mophun.certificate</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpe</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpeg</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpega</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpg</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpg4</extension>
<mime-type>video/mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpga</extension>
<mime-type>audio/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpkg</extension>
<mime-type>application/vnd.apple.installer+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpm</extension>
<mime-type>application/vnd.blueice.multipass</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpn</extension>
<mime-type>application/vnd.mophun.application</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpp</extension>
<mime-type>application/vnd.ms-project</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpt</extension>
<mime-type>application/vnd.ms-project</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpv2</extension>
<mime-type>video/mpeg2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpy</extension>
<mime-type>application/vnd.ibm.minipay</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mqy</extension>
<mime-type>application/vnd.mobius.mqy</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mrc</extension>
<mime-type>application/marc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mrcx</extension>
<mime-type>application/marcxml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ms</extension>
<mime-type>text/troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mscml</extension>
<mime-type>application/mediaservercontrol+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mseed</extension>
<mime-type>application/vnd.fdsn.mseed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mseq</extension>
<mime-type>application/vnd.mseq</mime-type>
</mime-mapping>
<mime-mapping>
<extension>msf</extension>
<mime-type>application/vnd.epson.msf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>msh</extension>
<mime-type>model/mesh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>msi</extension>
<mime-type>application/x-msdownload</mime-type>
</mime-mapping>
<mime-mapping>
<extension>msl</extension>
<mime-type>application/vnd.mobius.msl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>msty</extension>
<mime-type>application/vnd.muvee.style</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mts</extension>
<mime-type>model/vnd.mts</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mus</extension>
<mime-type>application/vnd.musician</mime-type>
</mime-mapping>
<mime-mapping>
<extension>musicxml</extension>
<mime-type>application/vnd.recordare.musicxml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mvb</extension>
<mime-type>application/x-msmediaview</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mwf</extension>
<mime-type>application/vnd.mfer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mxf</extension>
<mime-type>application/mxf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mxl</extension>
<mime-type>application/vnd.recordare.musicxml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mxml</extension>
<mime-type>application/xv+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mxs</extension>
<mime-type>application/vnd.triscape.mxs</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mxu</extension>
<mime-type>video/vnd.mpegurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>n-gage</extension>
<mime-type>application/vnd.nokia.n-gage.symbian.install</mime-type>
</mime-mapping>
<mime-mapping>
<extension>n3</extension>
<mime-type>text/n3</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nb</extension>
<mime-type>application/mathematica</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nbp</extension>
<mime-type>application/vnd.wolfram.player</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nc</extension>
<mime-type>application/x-netcdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ncx</extension>
<mime-type>application/x-dtbncx+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nfo</extension>
<mime-type>text/x-nfo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ngdat</extension>
<mime-type>application/vnd.nokia.n-gage.data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nitf</extension>
<mime-type>application/vnd.nitf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nlu</extension>
<mime-type>application/vnd.neurolanguage.nlu</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nml</extension>
<mime-type>application/vnd.enliven</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nnd</extension>
<mime-type>application/vnd.noblenet-directory</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nns</extension>
<mime-type>application/vnd.noblenet-sealer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nnw</extension>
<mime-type>application/vnd.noblenet-web</mime-type>
</mime-mapping>
<mime-mapping>
<extension>npx</extension>
<mime-type>image/vnd.net-fpx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nsc</extension>
<mime-type>application/x-conference</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nsf</extension>
<mime-type>application/vnd.lotus-notes</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ntf</extension>
<mime-type>application/vnd.nitf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nzb</extension>
<mime-type>application/x-nzb</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oa2</extension>
<mime-type>application/vnd.fujitsu.oasys2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oa3</extension>
<mime-type>application/vnd.fujitsu.oasys3</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oas</extension>
<mime-type>application/vnd.fujitsu.oasys</mime-type>
</mime-mapping>
<mime-mapping>
<extension>obd</extension>
<mime-type>application/x-msbinder</mime-type>
</mime-mapping>
<mime-mapping>
<extension>obj</extension>
<mime-type>application/x-tgif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oda</extension>
<mime-type>application/oda</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Database -->
<extension>odb</extension>
<mime-type>application/vnd.oasis.opendocument.database</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Chart -->
<extension>odc</extension>
<mime-type>application/vnd.oasis.opendocument.chart</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Formula -->
<extension>odf</extension>
<mime-type>application/vnd.oasis.opendocument.formula</mime-type>
</mime-mapping>
<mime-mapping>
<extension>odft</extension>
<mime-type>application/vnd.oasis.opendocument.formula-template</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Drawing -->
<extension>odg</extension>
<mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Image -->
<extension>odi</extension>
<mime-type>application/vnd.oasis.opendocument.image</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Master Document -->
<extension>odm</extension>
<mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Presentation -->
<extension>odp</extension>
<mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Spreadsheet -->
<extension>ods</extension>
<mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Text -->
<extension>odt</extension>
<mime-type>application/vnd.oasis.opendocument.text</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oga</extension>
<mime-type>audio/ogg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ogg</extension>
<mime-type>audio/ogg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ogv</extension>
<mime-type>video/ogg</mime-type>
</mime-mapping>
<mime-mapping>
<!-- xiph mime types -->
<extension>ogx</extension>
<mime-type>application/ogg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>omdoc</extension>
<mime-type>application/omdoc+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>onepkg</extension>
<mime-type>application/onenote</mime-type>
</mime-mapping>
<mime-mapping>
<extension>onetmp</extension>
<mime-type>application/onenote</mime-type>
</mime-mapping>
<mime-mapping>
<extension>onetoc</extension>
<mime-type>application/onenote</mime-type>
</mime-mapping>
<mime-mapping>
<extension>onetoc2</extension>
<mime-type>application/onenote</mime-type>
</mime-mapping>
<mime-mapping>
<extension>opf</extension>
<mime-type>application/oebps-package+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>opml</extension>
<mime-type>text/x-opml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oprc</extension>
<mime-type>application/vnd.palm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>org</extension>
<mime-type>application/vnd.lotus-organizer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>osf</extension>
<mime-type>application/vnd.yamaha.openscoreformat</mime-type>
</mime-mapping>
<mime-mapping>
<extension>osfpvg</extension>
<mime-type>application/vnd.yamaha.openscoreformat.osfpvg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>otc</extension>
<mime-type>application/vnd.oasis.opendocument.chart-template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>otf</extension>
<mime-type>font/otf</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Drawing Template -->
<extension>otg</extension>
<mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
</mime-mapping>
<mime-mapping>
<!-- HTML Document Template -->
<extension>oth</extension>
<mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oti</extension>
<mime-type>application/vnd.oasis.opendocument.image-template</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Presentation Template -->
<extension>otp</extension>
<mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Spreadsheet Template -->
<extension>ots</extension>
<mime-type>application/vnd.oasis.opendocument.spreadsheet-template</mime-type>
</mime-mapping>
<mime-mapping>
<!-- OpenDocument Text Template -->
<extension>ott</extension>
<mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oxps</extension>
<mime-type>application/oxps</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oxt</extension>
<mime-type>application/vnd.openofficeorg.extension</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p</extension>
<mime-type>text/x-pascal</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p10</extension>
<mime-type>application/pkcs10</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p12</extension>
<mime-type>application/x-pkcs12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p7b</extension>
<mime-type>application/x-pkcs7-certificates</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p7c</extension>
<mime-type>application/pkcs7-mime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p7m</extension>
<mime-type>application/pkcs7-mime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p7r</extension>
<mime-type>application/x-pkcs7-certreqresp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p7s</extension>
<mime-type>application/pkcs7-signature</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p8</extension>
<mime-type>application/pkcs8</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pas</extension>
<mime-type>text/x-pascal</mime-type>
</mime-mapping>
<mime-mapping>
<extension>paw</extension>
<mime-type>application/vnd.pawaafile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pbd</extension>
<mime-type>application/vnd.powerbuilder6</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pbm</extension>
<mime-type>image/x-portable-bitmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pcap</extension>
<mime-type>application/vnd.tcpdump.pcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pcf</extension>
<mime-type>application/x-font-pcf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pcl</extension>
<mime-type>application/vnd.hp-pcl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pclxl</extension>
<mime-type>application/vnd.hp-pclxl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pct</extension>
<mime-type>image/pict</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pcurl</extension>
<mime-type>application/vnd.curl.pcurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pcx</extension>
<mime-type>image/x-pcx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pdb</extension>
<mime-type>application/vnd.palm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pdf</extension>
<mime-type>application/pdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pfa</extension>
<mime-type>application/x-font-type1</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pfb</extension>
<mime-type>application/x-font-type1</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pfm</extension>
<mime-type>application/x-font-type1</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pfr</extension>
<mime-type>application/font-tdpfr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pfx</extension>
<mime-type>application/x-pkcs12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pgm</extension>
<mime-type>image/x-portable-graymap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pgn</extension>
<mime-type>application/x-chess-pgn</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pgp</extension>
<mime-type>application/pgp-encrypted</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pic</extension>
<mime-type>image/pict</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pict</extension>
<mime-type>image/pict</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pkg</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pki</extension>
<mime-type>application/pkixcmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pkipath</extension>
<mime-type>application/pkix-pkipath</mime-type>
</mime-mapping>
<mime-mapping>
<extension>plb</extension>
<mime-type>application/vnd.3gpp.pic-bw-large</mime-type>
</mime-mapping>
<mime-mapping>
<extension>plc</extension>
<mime-type>application/vnd.mobius.plc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>plf</extension>
<mime-type>application/vnd.pocketlearn</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pls</extension>
<mime-type>audio/x-scpls</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pml</extension>
<mime-type>application/vnd.ctc-posml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>png</extension>
<mime-type>image/png</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pnm</extension>
<mime-type>image/x-portable-anymap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pnt</extension>
<mime-type>image/x-macpaint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>portpkg</extension>
<mime-type>application/vnd.macports.portpkg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pot</extension>
<mime-type>application/vnd.ms-powerpoint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>potm</extension>
<mime-type>application/vnd.ms-powerpoint.template.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>potx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.presentationml.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppam</extension>
<mime-type>application/vnd.ms-powerpoint.addin.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppd</extension>
<mime-type>application/vnd.cups-ppd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppm</extension>
<mime-type>image/x-portable-pixmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pps</extension>
<mime-type>application/vnd.ms-powerpoint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppsm</extension>
<mime-type>application/vnd.ms-powerpoint.slideshow.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.presentationml.slideshow</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppt</extension>
<mime-type>application/vnd.ms-powerpoint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pptm</extension>
<mime-type>application/vnd.ms-powerpoint.presentation.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pptx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pqa</extension>
<mime-type>application/vnd.palm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>prc</extension>
<mime-type>application/x-mobipocket-ebook</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pre</extension>
<mime-type>application/vnd.lotus-freelance</mime-type>
</mime-mapping>
<mime-mapping>
<extension>prf</extension>
<mime-type>application/pics-rules</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ps</extension>
<mime-type>application/postscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>psb</extension>
<mime-type>application/vnd.3gpp.pic-bw-small</mime-type>
</mime-mapping>
<mime-mapping>
<extension>psd</extension>
<mime-type>image/vnd.adobe.photoshop</mime-type>
</mime-mapping>
<mime-mapping>
<extension>psf</extension>
<mime-type>application/x-font-linux-psf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pskcxml</extension>
<mime-type>application/pskc+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ptid</extension>
<mime-type>application/vnd.pvi.ptid1</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pub</extension>
<mime-type>application/x-mspublisher</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pvb</extension>
<mime-type>application/vnd.3gpp.pic-bw-var</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pwn</extension>
<mime-type>application/vnd.3m.post-it-notes</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pya</extension>
<mime-type>audio/vnd.ms-playready.media.pya</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pyv</extension>
<mime-type>video/vnd.ms-playready.media.pyv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qam</extension>
<mime-type>application/vnd.epson.quickanime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qbo</extension>
<mime-type>application/vnd.intu.qbo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qfx</extension>
<mime-type>application/vnd.intu.qfx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qps</extension>
<mime-type>application/vnd.publishare-delta-tree</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qt</extension>
<mime-type>video/quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qti</extension>
<mime-type>image/x-quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qtif</extension>
<mime-type>image/x-quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qwd</extension>
<mime-type>application/vnd.quark.quarkxpress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qwt</extension>
<mime-type>application/vnd.quark.quarkxpress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qxb</extension>
<mime-type>application/vnd.quark.quarkxpress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qxd</extension>
<mime-type>application/vnd.quark.quarkxpress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qxl</extension>
<mime-type>application/vnd.quark.quarkxpress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qxt</extension>
<mime-type>application/vnd.quark.quarkxpress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ra</extension>
<mime-type>audio/x-pn-realaudio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ram</extension>
<mime-type>audio/x-pn-realaudio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rar</extension>
<mime-type>application/x-rar-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ras</extension>
<mime-type>image/x-cmu-raster</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rcprofile</extension>
<mime-type>application/vnd.ipunplugged.rcprofile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rdf</extension>
<mime-type>application/rdf+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rdz</extension>
<mime-type>application/vnd.data-vision.rdz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rep</extension>
<mime-type>application/vnd.businessobjects</mime-type>
</mime-mapping>
<mime-mapping>
<extension>res</extension>
<mime-type>application/x-dtbresource+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rgb</extension>
<mime-type>image/x-rgb</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rif</extension>
<mime-type>application/reginfo+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rip</extension>
<mime-type>audio/vnd.rip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ris</extension>
<mime-type>application/x-research-info-systems</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rl</extension>
<mime-type>application/resource-lists+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rlc</extension>
<mime-type>image/vnd.fujixerox.edmics-rlc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rld</extension>
<mime-type>application/resource-lists-diff+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rm</extension>
<mime-type>application/vnd.rn-realmedia</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rmi</extension>
<mime-type>audio/midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rmp</extension>
<mime-type>audio/x-pn-realaudio-plugin</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rms</extension>
<mime-type>application/vnd.jcp.javame.midlet-rms</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rmvb</extension>
<mime-type>application/vnd.rn-realmedia-vbr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rnc</extension>
<mime-type>application/relax-ng-compact-syntax</mime-type>
</mime-mapping>
<mime-mapping>
<extension>roa</extension>
<mime-type>application/rpki-roa</mime-type>
</mime-mapping>
<mime-mapping>
<extension>roff</extension>
<mime-type>text/troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rp9</extension>
<mime-type>application/vnd.cloanto.rp9</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rpss</extension>
<mime-type>application/vnd.nokia.radio-presets</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rpst</extension>
<mime-type>application/vnd.nokia.radio-preset</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rq</extension>
<mime-type>application/sparql-query</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rs</extension>
<mime-type>application/rls-services+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rsd</extension>
<mime-type>application/rsd+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rss</extension>
<mime-type>application/rss+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rtf</extension>
<mime-type>application/rtf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rtx</extension>
<mime-type>text/richtext</mime-type>
</mime-mapping>
<mime-mapping>
<extension>s</extension>
<mime-type>text/x-asm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>s3m</extension>
<mime-type>audio/s3m</mime-type>
</mime-mapping>
<mime-mapping>
<extension>saf</extension>
<mime-type>application/vnd.yamaha.smaf-audio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sbml</extension>
<mime-type>application/sbml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sc</extension>
<mime-type>application/vnd.ibm.secure-container</mime-type>
</mime-mapping>
<mime-mapping>
<extension>scd</extension>
<mime-type>application/x-msschedule</mime-type>
</mime-mapping>
<mime-mapping>
<extension>scm</extension>
<mime-type>application/vnd.lotus-screencam</mime-type>
</mime-mapping>
<mime-mapping>
<extension>scq</extension>
<mime-type>application/scvp-cv-request</mime-type>
</mime-mapping>
<mime-mapping>
<extension>scs</extension>
<mime-type>application/scvp-cv-response</mime-type>
</mime-mapping>
<mime-mapping>
<extension>scurl</extension>
<mime-type>text/vnd.curl.scurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sda</extension>
<mime-type>application/vnd.stardivision.draw</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sdc</extension>
<mime-type>application/vnd.stardivision.calc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sdd</extension>
<mime-type>application/vnd.stardivision.impress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sdkd</extension>
<mime-type>application/vnd.solent.sdkm+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sdkm</extension>
<mime-type>application/vnd.solent.sdkm+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sdp</extension>
<mime-type>application/sdp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sdw</extension>
<mime-type>application/vnd.stardivision.writer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>see</extension>
<mime-type>application/vnd.seemail</mime-type>
</mime-mapping>
<mime-mapping>
<extension>seed</extension>
<mime-type>application/vnd.fdsn.seed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sema</extension>
<mime-type>application/vnd.sema</mime-type>
</mime-mapping>
<mime-mapping>
<extension>semd</extension>
<mime-type>application/vnd.semd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>semf</extension>
<mime-type>application/vnd.semf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ser</extension>
<mime-type>application/java-serialized-object</mime-type>
</mime-mapping>
<mime-mapping>
<extension>setpay</extension>
<mime-type>application/set-payment-initiation</mime-type>
</mime-mapping>
<mime-mapping>
<extension>setreg</extension>
<mime-type>application/set-registration-initiation</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sfd-hdstx</extension>
<mime-type>application/vnd.hydrostatix.sof-data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sfs</extension>
<mime-type>application/vnd.spotfire.sfs</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sfv</extension>
<mime-type>text/x-sfv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sgi</extension>
<mime-type>image/sgi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sgl</extension>
<mime-type>application/vnd.stardivision.writer-global</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sgm</extension>
<mime-type>text/sgml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sgml</extension>
<mime-type>text/sgml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sh</extension>
<mime-type>application/x-sh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>shar</extension>
<mime-type>application/x-shar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>shf</extension>
<mime-type>application/shf+xml</mime-type>
</mime-mapping>
<!--
<mime-mapping>
<extension>shtml</extension>
<mime-type>text/x-server-parsed-html</mime-type>
</mime-mapping>
-->
<mime-mapping>
<extension>sid</extension>
<mime-type>image/x-mrsid-image</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sig</extension>
<mime-type>application/pgp-signature</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sil</extension>
<mime-type>audio/silk</mime-type>
</mime-mapping>
<mime-mapping>
<extension>silo</extension>
<mime-type>model/mesh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sis</extension>
<mime-type>application/vnd.symbian.install</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sisx</extension>
<mime-type>application/vnd.symbian.install</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sit</extension>
<mime-type>application/x-stuffit</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sitx</extension>
<mime-type>application/x-stuffitx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>skd</extension>
<mime-type>application/vnd.koan</mime-type>
</mime-mapping>
<mime-mapping>
<extension>skm</extension>
<mime-type>application/vnd.koan</mime-type>
</mime-mapping>
<mime-mapping>
<extension>skp</extension>
<mime-type>application/vnd.koan</mime-type>
</mime-mapping>
<mime-mapping>
<extension>skt</extension>
<mime-type>application/vnd.koan</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sldm</extension>
<mime-type>application/vnd.ms-powerpoint.slide.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sldx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.presentationml.slide</mime-type>
</mime-mapping>
<mime-mapping>
<extension>slt</extension>
<mime-type>application/vnd.epson.salt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sm</extension>
<mime-type>application/vnd.stepmania.stepchart</mime-type>
</mime-mapping>
<mime-mapping>
<extension>smf</extension>
<mime-type>application/vnd.stardivision.math</mime-type>
</mime-mapping>
<mime-mapping>
<extension>smi</extension>
<mime-type>application/smil+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>smil</extension>
<mime-type>application/smil+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>smv</extension>
<mime-type>video/x-smv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>smzip</extension>
<mime-type>application/vnd.stepmania.package</mime-type>
</mime-mapping>
<mime-mapping>
<extension>snd</extension>
<mime-type>audio/basic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>snf</extension>
<mime-type>application/x-font-snf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>so</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spc</extension>
<mime-type>application/x-pkcs7-certificates</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spf</extension>
<mime-type>application/vnd.yamaha.smaf-phrase</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spl</extension>
<mime-type>application/x-futuresplash</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spot</extension>
<mime-type>text/vnd.in3d.spot</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spp</extension>
<mime-type>application/scvp-vp-response</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spq</extension>
<mime-type>application/scvp-vp-request</mime-type>
</mime-mapping>
<mime-mapping>
<extension>spx</extension>
<mime-type>audio/ogg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sql</extension>
<mime-type>application/x-sql</mime-type>
</mime-mapping>
<mime-mapping>
<extension>src</extension>
<mime-type>application/x-wais-source</mime-type>
</mime-mapping>
<mime-mapping>
<extension>srt</extension>
<mime-type>application/x-subrip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sru</extension>
<mime-type>application/sru+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>srx</extension>
<mime-type>application/sparql-results+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ssdl</extension>
<mime-type>application/ssdl+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sse</extension>
<mime-type>application/vnd.kodak-descriptor</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ssf</extension>
<mime-type>application/vnd.epson.ssf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ssml</extension>
<mime-type>application/ssml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>st</extension>
<mime-type>application/vnd.sailingtracker.track</mime-type>
</mime-mapping>
<mime-mapping>
<extension>stc</extension>
<mime-type>application/vnd.sun.xml.calc.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>std</extension>
<mime-type>application/vnd.sun.xml.draw.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>stf</extension>
<mime-type>application/vnd.wt.stf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sti</extension>
<mime-type>application/vnd.sun.xml.impress.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>stk</extension>
<mime-type>application/hyperstudio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>stl</extension>
<mime-type>application/vnd.ms-pki.stl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>str</extension>
<mime-type>application/vnd.pg.format</mime-type>
</mime-mapping>
<mime-mapping>
<extension>stw</extension>
<mime-type>application/vnd.sun.xml.writer.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sub</extension>
<mime-type>text/vnd.dvb.subtitle</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sus</extension>
<mime-type>application/vnd.sus-calendar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>susp</extension>
<mime-type>application/vnd.sus-calendar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sv4cpio</extension>
<mime-type>application/x-sv4cpio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sv4crc</extension>
<mime-type>application/x-sv4crc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svc</extension>
<mime-type>application/vnd.dvb.service</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svd</extension>
<mime-type>application/vnd.svd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svgz</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>swa</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>swf</extension>
<mime-type>application/x-shockwave-flash</mime-type>
</mime-mapping>
<mime-mapping>
<extension>swi</extension>
<mime-type>application/vnd.aristanetworks.swi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sxc</extension>
<mime-type>application/vnd.sun.xml.calc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sxd</extension>
<mime-type>application/vnd.sun.xml.draw</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sxg</extension>
<mime-type>application/vnd.sun.xml.writer.global</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sxi</extension>
<mime-type>application/vnd.sun.xml.impress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sxm</extension>
<mime-type>application/vnd.sun.xml.math</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sxw</extension>
<mime-type>application/vnd.sun.xml.writer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>t</extension>
<mime-type>text/troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>t3</extension>
<mime-type>application/x-t3vm-image</mime-type>
</mime-mapping>
<mime-mapping>
<extension>taglet</extension>
<mime-type>application/vnd.mynfc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tao</extension>
<mime-type>application/vnd.tao.intent-module-archive</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tar</extension>
<mime-type>application/x-tar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tcap</extension>
<mime-type>application/vnd.3gpp2.tcap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tcl</extension>
<mime-type>application/x-tcl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>teacher</extension>
<mime-type>application/vnd.smart.teacher</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tei</extension>
<mime-type>application/tei+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>teicorpus</extension>
<mime-type>application/tei+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tex</extension>
<mime-type>application/x-tex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>texi</extension>
<mime-type>application/x-texinfo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>texinfo</extension>
<mime-type>application/x-texinfo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>text</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tfi</extension>
<mime-type>application/thraud+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tfm</extension>
<mime-type>application/x-tex-tfm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tga</extension>
<mime-type>image/x-tga</mime-type>
</mime-mapping>
<mime-mapping>
<extension>thmx</extension>
<mime-type>application/vnd.ms-officetheme</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tif</extension>
<mime-type>image/tiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tiff</extension>
<mime-type>image/tiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tmo</extension>
<mime-type>application/vnd.tmobile-livetv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>torrent</extension>
<mime-type>application/x-bittorrent</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tpl</extension>
<mime-type>application/vnd.groove-tool-template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tpt</extension>
<mime-type>application/vnd.trid.tpt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tr</extension>
<mime-type>text/troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tra</extension>
<mime-type>application/vnd.trueapp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>trm</extension>
<mime-type>application/x-msterminal</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tsd</extension>
<mime-type>application/timestamped-data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tsv</extension>
<mime-type>text/tab-separated-values</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttc</extension>
<mime-type>font/collection</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttf</extension>
<mime-type>font/ttf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttl</extension>
<mime-type>text/turtle</mime-type>
</mime-mapping>
<mime-mapping>
<extension>twd</extension>
<mime-type>application/vnd.simtech-mindmapper</mime-type>
</mime-mapping>
<mime-mapping>
<extension>twds</extension>
<mime-type>application/vnd.simtech-mindmapper</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txd</extension>
<mime-type>application/vnd.genomatix.tuxedo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txf</extension>
<mime-type>application/vnd.mobius.txf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>u32</extension>
<mime-type>application/x-authorware-bin</mime-type>
</mime-mapping>
<mime-mapping>
<extension>udeb</extension>
<mime-type>application/x-debian-package</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ufd</extension>
<mime-type>application/vnd.ufdl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ufdl</extension>
<mime-type>application/vnd.ufdl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ulw</extension>
<mime-type>audio/basic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ulx</extension>
<mime-type>application/x-glulx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>umj</extension>
<mime-type>application/vnd.umajin</mime-type>
</mime-mapping>
<mime-mapping>
<extension>unityweb</extension>
<mime-type>application/vnd.unity</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uoml</extension>
<mime-type>application/vnd.uoml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uri</extension>
<mime-type>text/uri-list</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uris</extension>
<mime-type>text/uri-list</mime-type>
</mime-mapping>
<mime-mapping>
<extension>urls</extension>
<mime-type>text/uri-list</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ustar</extension>
<mime-type>application/x-ustar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>utz</extension>
<mime-type>application/vnd.uiq.theme</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uu</extension>
<mime-type>text/x-uuencode</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uva</extension>
<mime-type>audio/vnd.dece.audio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvd</extension>
<mime-type>application/vnd.dece.data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvf</extension>
<mime-type>application/vnd.dece.data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvg</extension>
<mime-type>image/vnd.dece.graphic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvh</extension>
<mime-type>video/vnd.dece.hd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvi</extension>
<mime-type>image/vnd.dece.graphic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvm</extension>
<mime-type>video/vnd.dece.mobile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvp</extension>
<mime-type>video/vnd.dece.pd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvs</extension>
<mime-type>video/vnd.dece.sd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvt</extension>
<mime-type>application/vnd.dece.ttml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvu</extension>
<mime-type>video/vnd.uvvu.mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvv</extension>
<mime-type>video/vnd.dece.video</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvva</extension>
<mime-type>audio/vnd.dece.audio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvd</extension>
<mime-type>application/vnd.dece.data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvf</extension>
<mime-type>application/vnd.dece.data</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvg</extension>
<mime-type>image/vnd.dece.graphic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvh</extension>
<mime-type>video/vnd.dece.hd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvi</extension>
<mime-type>image/vnd.dece.graphic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvm</extension>
<mime-type>video/vnd.dece.mobile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvp</extension>
<mime-type>video/vnd.dece.pd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvs</extension>
<mime-type>video/vnd.dece.sd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvt</extension>
<mime-type>application/vnd.dece.ttml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvu</extension>
<mime-type>video/vnd.uvvu.mp4</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvv</extension>
<mime-type>video/vnd.dece.video</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvx</extension>
<mime-type>application/vnd.dece.unspecified</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvvz</extension>
<mime-type>application/vnd.dece.zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvx</extension>
<mime-type>application/vnd.dece.unspecified</mime-type>
</mime-mapping>
<mime-mapping>
<extension>uvz</extension>
<mime-type>application/vnd.dece.zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vcard</extension>
<mime-type>text/vcard</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vcd</extension>
<mime-type>application/x-cdlink</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vcf</extension>
<mime-type>text/x-vcard</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vcg</extension>
<mime-type>application/vnd.groove-vcard</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vcs</extension>
<mime-type>text/x-vcalendar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vcx</extension>
<mime-type>application/vnd.vcx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vis</extension>
<mime-type>application/vnd.visionary</mime-type>
</mime-mapping>
<mime-mapping>
<extension>viv</extension>
<mime-type>video/vnd.vivo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vob</extension>
<mime-type>video/x-ms-vob</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vor</extension>
<mime-type>application/vnd.stardivision.writer</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vox</extension>
<mime-type>application/x-authorware-bin</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vrml</extension>
<mime-type>model/vrml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vsd</extension>
<mime-type>application/vnd.visio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vsf</extension>
<mime-type>application/vnd.vsf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vss</extension>
<mime-type>application/vnd.visio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vst</extension>
<mime-type>application/vnd.visio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vsw</extension>
<mime-type>application/vnd.visio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vtu</extension>
<mime-type>model/vnd.vtu</mime-type>
</mime-mapping>
<mime-mapping>
<extension>vxml</extension>
<mime-type>application/voicexml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>w3d</extension>
<mime-type>application/x-director</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wad</extension>
<mime-type>application/x-doom</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wav</extension>
<mime-type>audio/x-wav</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wax</extension>
<mime-type>audio/x-ms-wax</mime-type>
</mime-mapping>
<mime-mapping>
<!-- Wireless Bitmap -->
<extension>wbmp</extension>
<mime-type>image/vnd.wap.wbmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wbs</extension>
<mime-type>application/vnd.criticaltools.wbs+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wbxml</extension>
<mime-type>application/vnd.wap.wbxml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wcm</extension>
<mime-type>application/vnd.ms-works</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wdb</extension>
<mime-type>application/vnd.ms-works</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wdp</extension>
<mime-type>image/vnd.ms-photo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>weba</extension>
<mime-type>audio/webm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>webm</extension>
<mime-type>video/webm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>webp</extension>
<mime-type>image/webp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wg</extension>
<mime-type>application/vnd.pmi.widget</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wgt</extension>
<mime-type>application/widget</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wks</extension>
<mime-type>application/vnd.ms-works</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wm</extension>
<mime-type>video/x-ms-wm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wma</extension>
<mime-type>audio/x-ms-wma</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wmd</extension>
<mime-type>application/x-ms-wmd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wmf</extension>
<mime-type>application/x-msmetafile</mime-type>
</mime-mapping>
<mime-mapping>
<!-- WML Source -->
<extension>wml</extension>
<mime-type>text/vnd.wap.wml</mime-type>
</mime-mapping>
<mime-mapping>
<!-- Compiled WML -->
<extension>wmlc</extension>
<mime-type>application/vnd.wap.wmlc</mime-type>
</mime-mapping>
<mime-mapping>
<!-- WML Script Source -->
<extension>wmls</extension>
<mime-type>text/vnd.wap.wmlscript</mime-type>
</mime-mapping>
<mime-mapping>
<!-- Compiled WML Script -->
<extension>wmlsc</extension>
<mime-type>application/vnd.wap.wmlscriptc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wmv</extension>
<mime-type>video/x-ms-wmv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wmx</extension>
<mime-type>video/x-ms-wmx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wmz</extension>
<mime-type>application/x-msmetafile</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff</extension>
<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>
<mime-type>application/vnd.wordperfect</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wpl</extension>
<mime-type>application/vnd.ms-wpl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wps</extension>
<mime-type>application/vnd.ms-works</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wqd</extension>
<mime-type>application/vnd.wqd</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wri</extension>
<mime-type>application/x-mswrite</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wrl</extension>
<mime-type>model/vrml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wsdl</extension>
<mime-type>application/wsdl+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wspolicy</extension>
<mime-type>application/wspolicy+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wtb</extension>
<mime-type>application/vnd.webturbo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wvx</extension>
<mime-type>video/x-ms-wvx</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x32</extension>
<mime-type>application/x-authorware-bin</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x3d</extension>
<mime-type>model/x3d+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x3db</extension>
<mime-type>model/x3d+binary</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x3dbz</extension>
<mime-type>model/x3d+binary</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x3dv</extension>
<mime-type>model/x3d+vrml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x3dvz</extension>
<mime-type>model/x3d+vrml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>x3dz</extension>
<mime-type>model/x3d+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xaml</extension>
<mime-type>application/xaml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xap</extension>
<mime-type>application/x-silverlight-app</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xar</extension>
<mime-type>application/vnd.xara</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xbap</extension>
<mime-type>application/x-ms-xbap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xbd</extension>
<mime-type>application/vnd.fujixerox.docuworks.binder</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xbm</extension>
<mime-type>image/x-xbitmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xdf</extension>
<mime-type>application/xcap-diff+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xdm</extension>
<mime-type>application/vnd.syncml.dm+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xdp</extension>
<mime-type>application/vnd.adobe.xdp+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xdssc</extension>
<mime-type>application/dssc+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xdw</extension>
<mime-type>application/vnd.fujixerox.docuworks</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xenc</extension>
<mime-type>application/xenc+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xer</extension>
<mime-type>application/patch-ops-error+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xfdf</extension>
<mime-type>application/vnd.adobe.xfdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xfdl</extension>
<mime-type>application/vnd.xfdl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xht</extension>
<mime-type>application/xhtml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xhtml</extension>
<mime-type>application/xhtml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xhvml</extension>
<mime-type>application/xv+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xif</extension>
<mime-type>image/vnd.xiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xla</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlam</extension>
<mime-type>application/vnd.ms-excel.addin.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlc</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlf</extension>
<mime-type>application/x-xliff+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlm</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlsb</extension>
<mime-type>application/vnd.ms-excel.sheet.binary.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlsm</extension>
<mime-type>application/vnd.ms-excel.sheet.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlt</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xltm</extension>
<mime-type>application/vnd.ms-excel.template.macroenabled.12</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xltx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.template</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlw</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xm</extension>
<mime-type>audio/xm</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xml</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xo</extension>
<mime-type>application/vnd.olpc-sugar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xop</extension>
<mime-type>application/xop+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpi</extension>
<mime-type>application/x-xpinstall</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpl</extension>
<mime-type>application/xproc+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpm</extension>
<mime-type>image/x-xpixmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpr</extension>
<mime-type>application/vnd.is-xpr</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xps</extension>
<mime-type>application/vnd.ms-xpsdocument</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpw</extension>
<mime-type>application/vnd.intercon.formnet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpx</extension>
<mime-type>application/vnd.intercon.formnet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsl</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xslt</extension>
<mime-type>application/xslt+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsm</extension>
<mime-type>application/vnd.syncml+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xspf</extension>
<mime-type>application/xspf+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xul</extension>
<mime-type>application/vnd.mozilla.xul+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xvm</extension>
<mime-type>application/xv+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xvml</extension>
<mime-type>application/xv+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xwd</extension>
<mime-type>image/x-xwindowdump</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xyz</extension>
<mime-type>chemical/x-xyz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xz</extension>
<mime-type>application/x-xz</mime-type>
</mime-mapping>
<mime-mapping>
<extension>yang</extension>
<mime-type>application/yang</mime-type>
</mime-mapping>
<mime-mapping>
<extension>yin</extension>
<mime-type>application/yin+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z</extension>
<mime-type>application/x-compress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z1</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z2</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z3</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z4</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z5</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z6</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z7</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z8</extension>
<mime-type>application/x-zmachine</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zaz</extension>
<mime-type>application/vnd.zzazz.deck+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zip</extension>
<mime-type>application/zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zir</extension>
<mime-type>application/vnd.zul</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zirz</extension>
<mime-type>application/vnd.zul</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zmm</extension>
<mime-type>application/vnd.handheld-entertainment+xml</mime-type>
</mime-mapping>
<!-- ==================== Default Welcome File List ===================== -->
<!-- When a request URI refers to a directory, the default servlet looks -->
<!-- for a "welcome file" within that directory and, if present, to the -->
<!-- corresponding resource URI for display. -->
<!-- If no welcome files are present, the default servlet either serves a -->
<!-- directory listing (see default servlet configuration on how to -->
<!-- customize) or returns a 404 status, depending on the value of the -->
<!-- listings setting. -->
<!-- -->
<!-- If you define welcome files in your own application's web.xml -->
<!-- deployment descriptor, that list *replaces* the list configured -->
<!-- here, so be sure to include any of the default values that you wish -->
<!-- to use within your application. -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

Contributing to Apache Tomcat

Firstly, thanks for your interest in contributing! I hope that this will be a pleasant experience for you, and that you will return to continue contributing.

Please visit our Get Involved page for more information on how to contribute.

Code of Conduct

This project and everyone participating in it are governed by the Apache software Foundation's Code of Conduct. By participating, you are expected to adhere to this code. If you are aware of unacceptable behavior, please visit the Reporting Guidelines page and follow the instructions there.

How Can I Contribute?

Most of the contributions that we receive are code contributions, but you can also contribute to the documentation, wiki, etc., or simply report solid bugs for us to fix.

Reporting Bugs

Please review our guide on how to submit a bug report. This page also has links to other resources to assist you.

Your First Code Contribution

Trouble Deciding How to Contribute?

Unsure where to begin contributing to Tomcat? You can start by taking a look at the issues marked 'Beginner', link below. Please note that the Beginner keyword is pretty new to the project, so if there aren't any issues in the filter feel free to ask on the dev list.

  • Beginner issues - issues which should only require a few lines of code, and a test or two to resolve.

The list above shows all bugs that are marked 'Beginner' and are open in the currently supported Tomcat versions (7, 8.5, and 9).

If you prefer C over Java, you may also take a look at the tomcat-native and Tomcat Connectors products in Bugzilla.

How to Provide Your First Patch

Excited yet? This section will guide you through providing a patch to the committers of the project for review and acceptance.

Choose Your Method of Submission

You can provide a patch in one of the following ways (in order of preference):

  • GitHub Pull Request
  • Patch attachment to the Bugzilla issue
  • Email the patch to the developer list. This is not preferred, but if no bug is associated with the patch, or you would like a developer review, an email may be appropriate.
Get the Sources

Now that you've chosen how you want to submit a patch, you need to get the source code.

Download The Source Distribution

This method works if you want to submit a patch via email, but the difference in using the sources distribution and a VCS is that you have to manually generate the patch file by using diff. If this is what you want, you can download the sources from the "Source Code Distributions" section of the Download Page. There is one such page for every major Tomcat version:

Manual Patch Generation

If you have chosen to attach a patch to the Bugzilla issue (or email one), then you'll need to download the sources as noted above, make your desired changes and then manually generate your patch using diff (or any other tool).

GitHub

To submit a GitHub Pull Request you'll need to fork the repository, clone your fork to do the work:

$ git clone https://github.com/$USERNAME/tomcat.git

and then push your changes, and submit a Pull Request via the GitHub UI.

Submitting Your Patch!

After you've chosen your method of submission, retrieved the sources, and fixed the issue it's time to submit your work. At this point, just follow the method of submission you chose earlier.

  • GitHub PR - after resolving the issue in your local fork and pushing to your copy of the repository, open a GitHub PR for review.
  • Bugzilla attachment - attach the patch to the Bugzilla issue
  • Email - again, not preferred, but you may send an email to the developer list with a patch attached for review.

Waiting For Feedback

It may take a while for committers to review. Please be patient during this time as all committers are volunteers on the project. If a significant amount of time has lapsed since your submission, such as a couple of months, feel free to either update your BZ, PR, or email the dev list with a message to bump your issue. Sometimes things get lost in all the work and we need a reminder 😄

Style Guide

Apache Tomcat has very loosely defined coding conventions, but the following guidelines will be useful:

  • Use spaces for indenting, not tabs
  • 100 char line width for Java source, 80 char line width for documentation source (.txt, .xml)
  • Java source: { at end of line, 4 space indents
  • XML source: 2 space indents

Did we miss something?

Have you reviewed this guide and found it lacking? Or are you confused about some particular step? If so, please let us know! Or better yet, submit a PR to address the issue 😉

/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target({ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD,
ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
public @interface Generated {
public String[] value();
public String date() default "";
public String comments() default "";
}
/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.1
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ManagedBean {
String value() default "";
}
/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PostConstruct {
// No attributes
}
/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PreDestroy {
// No attributes
}
/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.2
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Priority {
int value();
}
/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Resource {
public enum AuthenticationType {
CONTAINER,
APPLICATION
}
public String name() default "";
/**
* Uses generics since Common Annotations 1.2.
*
* @return The type for instances of this resource
*/
public Class<?> type() default Object.class;
public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
public boolean shareable() default true;
public String description() default "";
public String mappedName() default "";
/**
* @since Common Annotations 1.1
*
* @return The name of the entry, if any, to use for this resource
*/
public String lookup() default "";
}
/*
* 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.
*/
package jakarta.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Resources {
public Resource[] value();
}
/*
* 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.
*/
package jakarta.annotation.security;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DeclareRoles {
public String[] value();
}
/*
* 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.
*/
package jakarta.annotation.security;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface DenyAll {
// No attributes
}
/*
* 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.
*/
package jakarta.annotation.security;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PermitAll {
// No attributes
}
/*
* 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.
*/
package jakarta.annotation.security;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface RolesAllowed {
public String[] value();
}
/*
* 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.
*/
package jakarta.annotation.security;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface RunAs {
public String value();
}
/*
* 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.
*/
package jakarta.annotation.sql;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.1
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DataSourceDefinition {
String className();
String name();
String description() default "";
String url() default "";
String user() default "";
String password() default "";
String databaseName() default "";
int portNumber() default -1;
String serverName() default "localhost";
int isolationLevel() default -1;
boolean transactional() default true;
int initialPoolSize() default -1;
int maxPoolSize() default -1;
int minPoolSize() default -1;
int maxIdleTime() default -1;
int maxStatements() default -1;
String[] properties() default {};
int loginTimeout() default 0;
}
/*
* 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.
*/
package jakarta.annotation.sql;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.1
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DataSourceDefinitions {
DataSourceDefinition[] value();
}
/*
* 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.
*/
package jakarta.ejb;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface EJB {
String name() default "";
String description() default "";
@SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match specification
Class beanInterface() default java.lang.Object.class;
String beanName() default "";
String mappedName() default "";
String lookup() default "";
}
/*
* 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.
*/
package jakarta.ejb;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface EJBs {
EJB[] value();
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.lang.reflect.Array;
import java.util.Iterator;
import java.util.Objects;
public class ArrayELResolver extends ELResolver {
private final boolean readOnly;
public ArrayELResolver() {
this.readOnly = false;
}
public ArrayELResolver(boolean readOnly) {
this.readOnly = readOnly;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base != null && base.getClass().isArray()) {
context.setPropertyResolved(base, property);
try {
int idx = coerce(property);
checkBounds(base, idx);
} catch (IllegalArgumentException e) {
// ignore
}
return base.getClass().getComponentType();
}
return null;
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base != null && base.getClass().isArray()) {
context.setPropertyResolved(base, property);
int idx = coerce(property);
if (idx < 0 || idx >= Array.getLength(base)) {
return null;
}
return Array.get(base, idx);
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base != null && base.getClass().isArray()) {
context.setPropertyResolved(base, property);
if (this.readOnly) {
throw new PropertyNotWritableException(Util.message(context,
"resolverNotWriteable", base.getClass().getName()));
}
int idx = coerce(property);
checkBounds(base, idx);
if (value != null && !Util.isAssignableFrom(value.getClass(),
base.getClass().getComponentType())) {
throw new ClassCastException(Util.message(context,
"objectNotAssignable", value.getClass().getName(),
base.getClass().getComponentType().getName()));
}
Array.set(base, idx, value);
}
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base != null && base.getClass().isArray()) {
context.setPropertyResolved(base, property);
try {
int idx = coerce(property);
checkBounds(base, idx);
} catch (IllegalArgumentException e) {
// ignore
}
}
return this.readOnly;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base != null && base.getClass().isArray()) {
return Integer.class;
}
return null;
}
private static final void checkBounds(Object base, int idx) {
if (idx < 0 || idx >= Array.getLength(base)) {
throw new PropertyNotFoundException(
new ArrayIndexOutOfBoundsException(idx).getMessage());
}
}
private static final int coerce(Object property) {
if (property instanceof Number) {
return ((Number) property).intValue();
}
if (property instanceof Character) {
return ((Character) property).charValue();
}
if (property instanceof Boolean) {
return ((Boolean) property).booleanValue() ? 1 : 0;
}
if (property instanceof String) {
return Integer.parseInt((String) property);
}
throw new IllegalArgumentException(property != null ?
property.toString() : "null");
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.BeanInfo;
import java.beans.FeatureDescriptor;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
public class BeanELResolver extends ELResolver {
private static final int CACHE_SIZE;
private static final String CACHE_SIZE_PROP =
"org.apache.el.BeanELResolver.CACHE_SIZE";
static {
String cacheSizeStr;
if (System.getSecurityManager() == null) {
cacheSizeStr = System.getProperty(CACHE_SIZE_PROP, "1000");
} else {
cacheSizeStr = AccessController.doPrivileged(
new PrivilegedAction<String>() {
@Override
public String run() {
return System.getProperty(CACHE_SIZE_PROP, "1000");
}
});
}
CACHE_SIZE = Integer.parseInt(cacheSizeStr);
}
private final boolean readOnly;
private final ConcurrentCache<String, BeanProperties> cache =
new ConcurrentCache<>(CACHE_SIZE);
public BeanELResolver() {
this.readOnly = false;
}
public BeanELResolver(boolean readOnly) {
this.readOnly = readOnly;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base == null || property == null) {
return null;
}
context.setPropertyResolved(base, property);
return this.property(context, base, property).getPropertyType();
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base == null || property == null) {
return null;
}
context.setPropertyResolved(base, property);
Method m = this.property(context, base, property).read(context, base);
try {
return m.invoke(base, (Object[]) null);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(Util.message(context, "propertyReadError",
base.getClass().getName(), property.toString()), cause);
} catch (Exception e) {
throw new ELException(e);
}
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base == null || property == null) {
return;
}
context.setPropertyResolved(base, property);
if (this.readOnly) {
throw new PropertyNotWritableException(Util.message(context,
"resolverNotWriteable", base.getClass().getName()));
}
Method m = this.property(context, base, property).write(context, base);
try {
m.invoke(base, value);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(Util.message(context, "propertyWriteError",
base.getClass().getName(), property.toString()), cause);
} catch (Exception e) {
throw new ELException(e);
}
}
/**
* @since EL 2.2
*/
@Override
public Object invoke(ELContext context, Object base, Object method,
Class<?>[] paramTypes, Object[] params) {
Objects.requireNonNull(context);
if (base == null || method == null) {
return null;
}
ExpressionFactory factory = ELManager.getExpressionFactory();
String methodName = (String) factory.coerceToType(method, String.class);
// Find the matching method
Method matchingMethod =
Util.findMethod(base.getClass(), base, methodName, paramTypes, params);
Object[] parameters = Util.buildParameters(
matchingMethod.getParameterTypes(), matchingMethod.isVarArgs(),
params);
Object result = null;
try {
result = matchingMethod.invoke(base, parameters);
} catch (IllegalArgumentException | IllegalAccessException e) {
throw new ELException(e);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(cause);
}
context.setPropertyResolved(base, method);
return result;
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base == null || property == null) {
return false;
}
context.setPropertyResolved(base, property);
return this.readOnly || this.property(context, base, property).isReadOnly(base);
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
if (base == null) {
return null;
}
try {
BeanInfo info = Introspector.getBeanInfo(base.getClass());
PropertyDescriptor[] pds = info.getPropertyDescriptors();
for (int i = 0; i < pds.length; i++) {
pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
pds[i].setValue(TYPE, pds[i].getPropertyType());
}
return Arrays.asList((FeatureDescriptor[]) pds).iterator();
} catch (IntrospectionException e) {
//
}
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base != null) {
return Object.class;
}
return null;
}
static final class BeanProperties {
private final Map<String, BeanProperty> properties;
private final Class<?> type;
public BeanProperties(Class<?> type) throws ELException {
this.type = type;
this.properties = new HashMap<>();
try {
BeanInfo info = Introspector.getBeanInfo(this.type);
PropertyDescriptor[] pds = info.getPropertyDescriptors();
for (PropertyDescriptor pd: pds) {
this.properties.put(pd.getName(), new BeanProperty(type, pd));
}
if (System.getSecurityManager() != null) {
// When running with SecurityManager, some classes may be
// not accessible, but have accessible interfaces.
populateFromInterfaces(type);
}
} catch (IntrospectionException ie) {
throw new ELException(ie);
}
}
private void populateFromInterfaces(Class<?> aClass) throws IntrospectionException {
Class<?> interfaces[] = aClass.getInterfaces();
if (interfaces.length > 0) {
for (Class<?> ifs : interfaces) {
BeanInfo info = Introspector.getBeanInfo(ifs);
PropertyDescriptor[] pds = info.getPropertyDescriptors();
for (PropertyDescriptor pd : pds) {
if (!this.properties.containsKey(pd.getName())) {
this.properties.put(pd.getName(), new BeanProperty(
this.type, pd));
}
}
populateFromInterfaces(ifs);
}
}
Class<?> superclass = aClass.getSuperclass();
if (superclass != null) {
populateFromInterfaces(superclass);
}
}
private BeanProperty get(ELContext ctx, String name) {
BeanProperty property = this.properties.get(name);
if (property == null) {
throw new PropertyNotFoundException(Util.message(ctx,
"propertyNotFound", type.getName(), name));
}
return property;
}
private Class<?> getType() {
return type;
}
}
static final class BeanProperty {
private final Class<?> type;
private final Class<?> owner;
private final PropertyDescriptor descriptor;
private Method read;
private Method write;
public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
this.owner = owner;
this.descriptor = descriptor;
this.type = descriptor.getPropertyType();
}
public Class<?> getPropertyType() {
return this.type;
}
public boolean isReadOnly(Object base) {
return this.write == null &&
(null == (this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod())));
}
private Method write(ELContext ctx, Object base) {
if (this.write == null) {
this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod());
if (this.write == null) {
throw new PropertyNotWritableException(Util.message(ctx,
"propertyNotWritable", new Object[] {
owner.getName(), descriptor.getName() }));
}
}
return this.write;
}
private Method read(ELContext ctx, Object base) {
if (this.read == null) {
this.read = Util.getMethod(this.owner, base, descriptor.getReadMethod());
if (this.read == null) {
throw new PropertyNotFoundException(Util.message(ctx,
"propertyNotReadable", new Object[] {
owner.getName(), descriptor.getName() }));
}
}
return this.read;
}
}
private final BeanProperty property(ELContext ctx, Object base,
Object property) {
Class<?> type = base.getClass();
String prop = property.toString();
BeanProperties props = this.cache.get(type.getName());
if (props == null || type != props.getType()) {
props = new BeanProperties(type);
this.cache.put(type.getName(), props);
}
return props.get(ctx, prop);
}
private static final class ConcurrentCache<K,V> {
private final int size;
private final Map<K,V> eden;
private final Map<K,V> longterm;
public ConcurrentCache(int size) {
this.size = size;
this.eden = new ConcurrentHashMap<>(size);
this.longterm = new WeakHashMap<>(size);
}
public V get(K key) {
V value = this.eden.get(key);
if (value == null) {
synchronized (longterm) {
value = this.longterm.get(key);
}
if (value != null) {
this.eden.put(key, value);
}
}
return value;
}
public void put(K key, V value) {
if (this.eden.size() >= this.size) {
synchronized (longterm) {
this.longterm.putAll(this.eden);
}
this.eden.clear();
}
this.eden.put(key, value);
}
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.util.Iterator;
import java.util.Objects;
/**
* @since EL 3.0
*/
public class BeanNameELResolver extends ELResolver {
private final BeanNameResolver beanNameResolver;
public BeanNameELResolver(BeanNameResolver beanNameResolver) {
this.beanNameResolver = beanNameResolver;
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base != null || !(property instanceof String)) {
return null;
}
String beanName = (String) property;
if (beanNameResolver.isNameResolved(beanName)) {
try {
Object result = beanNameResolver.getBean(beanName);
context.setPropertyResolved(base, property);
return result;
} catch (Throwable t) {
Util.handleThrowable(t);
throw new ELException(t);
}
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base != null || !(property instanceof String)) {
return;
}
String beanName = (String) property;
boolean isResolved = context.isPropertyResolved();
boolean isReadOnly;
try {
isReadOnly = isReadOnly(context, base, property);
} catch (Throwable t) {
Util.handleThrowable(t);
throw new ELException(t);
} finally {
context.setPropertyResolved(isResolved);
}
if (isReadOnly) {
throw new PropertyNotWritableException(Util.message(context,
"beanNameELResolver.beanReadOnly", beanName));
}
if (beanNameResolver.isNameResolved(beanName) ||
beanNameResolver.canCreateBean(beanName)) {
try {
beanNameResolver.setBeanValue(beanName, value);
context.setPropertyResolved(base, property);
} catch (Throwable t) {
Util.handleThrowable(t);
throw new ELException(t);
}
}
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base != null || !(property instanceof String)) {
return null;
}
String beanName = (String) property;
try {
if (beanNameResolver.isNameResolved(beanName)) {
Class<?> result = beanNameResolver.getBean(beanName).getClass();
context.setPropertyResolved(base, property);
return result;
}
} catch (Throwable t) {
Util.handleThrowable(t);
throw new ELException(t);
}
return null;
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base != null || !(property instanceof String)) {
// Return value undefined
return false;
}
String beanName = (String) property;
if (beanNameResolver.isNameResolved(beanName)) {
boolean result;
try {
result = beanNameResolver.isReadOnly(beanName);
} catch (Throwable t) {
Util.handleThrowable(t);
throw new ELException(t);
}
context.setPropertyResolved(base, property);
return result;
}
// Return value undefined
return false;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
Object base) {
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return String.class;
}
}
/*
* 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.
*/
package jakarta.el;
/**
* Base implementation that provides a minimal default implementation that is
* intended to be extended by application developers.
*
* @since EL 3.0
*/
public abstract class BeanNameResolver {
/**
* Can this resolver resolve the given bean name?
*
* @param beanName The bean name to resolve
*
* @return This default implementation always returns <code>false</code>
*/
public boolean isNameResolved(String beanName) {
return false;
}
/**
* Returns the named bean.
*
* @param beanName The bean name to return
*
* @return This default implementation always returns <code>null</code>
*/
public Object getBean(String beanName) {
return null;
}
/**
* Sets a value of a bean of the given name. If the named bean does not
* exist and {@link #canCreateBean} returns <code>true</code> then a bean
* is created with the given value.
*
* @param beanName The name of the bean to be set/create
* @param value The value of the bean to set/create
*
* @throws PropertyNotWritableException if the bean is read only
*/
public void setBeanValue(String beanName, Object value)
throws PropertyNotWritableException {
throw new PropertyNotWritableException();
}
/**
* Is the named bean read-only?
*
* @param beanName The name of the bean of interest
*
* @return <code>true</code> if the bean is read only, otherwise
* <code>false</code>
*/
public boolean isReadOnly(String beanName) {
return true;
}
/**
* Is it permitted to create a bean of the given name?
*
* @param beanName The name of the bean of interest
*
* @return <code>true</code> if the bean may be created, otherwise
* <code>false</code>
*/
public boolean canCreateBean(String beanName) {
return false;
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Objects;
public class CompositeELResolver extends ELResolver {
private static final Class<?> SCOPED_ATTRIBUTE_EL_RESOLVER;
static {
Class<?> clazz = null;
try {
clazz = Class.forName("jakarta.servlet.jsp.el.ScopedAttributeELResolver");
} catch (ClassNotFoundException e) {
// Ignore. This is expected if using the EL stand-alone
}
SCOPED_ATTRIBUTE_EL_RESOLVER = clazz;
}
private int size;
private ELResolver[] resolvers;
public CompositeELResolver() {
this.size = 0;
this.resolvers = new ELResolver[8];
}
public void add(ELResolver elResolver) {
Objects.requireNonNull(elResolver);
if (this.size >= this.resolvers.length) {
ELResolver[] nr = new ELResolver[this.size * 2];
System.arraycopy(this.resolvers, 0, nr, 0, this.size);
this.resolvers = nr;
}
this.resolvers[this.size++] = elResolver;
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
context.setPropertyResolved(false);
int sz = this.size;
for (int i = 0; i < sz; i++) {
Object result = this.resolvers[i].getValue(context, base, property);
if (context.isPropertyResolved()) {
return result;
}
}
return null;
}
/**
* @since EL 2.2
*/
@Override
public Object invoke(ELContext context, Object base, Object method,
Class<?>[] paramTypes, Object[] params) {
context.setPropertyResolved(false);
int sz = this.size;
for (int i = 0; i < sz; i++) {
Object obj = this.resolvers[i].invoke(context, base, method, paramTypes, params);
if (context.isPropertyResolved()) {
return obj;
}
}
return null;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
context.setPropertyResolved(false);
int sz = this.size;
for (int i = 0; i < sz; i++) {
Class<?> type = this.resolvers[i].getType(context, base, property);
if (context.isPropertyResolved()) {
if (SCOPED_ATTRIBUTE_EL_RESOLVER != null &&
SCOPED_ATTRIBUTE_EL_RESOLVER.isAssignableFrom(resolvers[i].getClass())) {
// Special case since
// jakarta.servlet.jsp.el.ScopedAttributeELResolver will
// always return Object.class for type
Object value = resolvers[i].getValue(context, base, property);
if (value != null) {
return value.getClass();
}
}
return type;
}
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
context.setPropertyResolved(false);
int sz = this.size;
for (int i = 0; i < sz; i++) {
this.resolvers[i].setValue(context, base, property, value);
if (context.isPropertyResolved()) {
return;
}
}
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
context.setPropertyResolved(false);
int sz = this.size;
for (int i = 0; i < sz; i++) {
boolean readOnly = this.resolvers[i].isReadOnly(context, base, property);
if (context.isPropertyResolved()) {
return readOnly;
}
}
return false;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return new FeatureIterator(context, base, this.resolvers, this.size);
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
Class<?> commonType = null;
int sz = this.size;
for (int i = 0; i < sz; i++) {
Class<?> type = this.resolvers[i].getCommonPropertyType(context, base);
if (type != null && (commonType == null || commonType.isAssignableFrom(type))) {
commonType = type;
}
}
return commonType;
}
@Override
public Object convertToType(ELContext context, Object obj, Class<?> type) {
context.setPropertyResolved(false);
int sz = this.size;
for (int i = 0; i < sz; i++) {
Object result = this.resolvers[i].convertToType(context, obj, type);
if (context.isPropertyResolved()) {
return result;
}
}
return null;
}
private static final class FeatureIterator implements Iterator<FeatureDescriptor> {
private final ELContext context;
private final Object base;
private final ELResolver[] resolvers;
private final int size;
private Iterator<FeatureDescriptor> itr;
private int idx;
private FeatureDescriptor next;
public FeatureIterator(ELContext context, Object base, ELResolver[] resolvers, int size) {
this.context = context;
this.base = base;
this.resolvers = resolvers;
this.size = size;
this.idx = 0;
this.guaranteeIterator();
}
private void guaranteeIterator() {
while (this.itr == null && this.idx < this.size) {
this.itr = this.resolvers[this.idx].getFeatureDescriptors(this.context, this.base);
this.idx++;
}
}
@Override
public boolean hasNext() {
if (this.next != null)
return true;
if (this.itr != null) {
while (this.next == null && itr.hasNext()) {
this.next = itr.next();
}
} else {
return false;
}
if (this.next == null) {
this.itr = null;
this.guaranteeIterator();
}
return hasNext();
}
@Override
public FeatureDescriptor next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
FeatureDescriptor result = this.next;
this.next = null;
return result;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
}
/*
* 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.
*/
package jakarta.el;
/**
* @since EL 3.0
*/
public class ELClass {
private final Class<?> clazz;
public ELClass(Class<?> clazz) {
this.clazz = clazz;
}
public Class<?> getKlass() {
return clazz;
}
}
/*
* 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.
*/
package jakarta.el;
import java.util.ArrayList;
import java.util.Deque;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
public abstract class ELContext {
private Locale locale;
private Map<Class<?>, Object> map;
private boolean resolved;
private ImportHandler importHandler = null;
private List<EvaluationListener> listeners = new ArrayList<>();
private Deque<Map<String,Object>> lambdaArguments = new LinkedList<>();
public ELContext() {
this.resolved = false;
}
public void setPropertyResolved(boolean resolved) {
this.resolved = resolved;
}
/**
* Mark the given property as resolved and notify any interested listeners.
*
* @param base The base object on which the property was found
* @param property The property that was resolved
*
* @since EL 3.0
*/
public void setPropertyResolved(Object base, Object property) {
setPropertyResolved(true);
notifyPropertyResolved(base, property);
}
public boolean isPropertyResolved() {
return this.resolved;
}
/**
* Add an object to this EL context under the given key.
*
* @param key The key under which to store the object
* @param contextObject The object to add
*
* @throws NullPointerException
* If the supplied key or context is <code>null</code>
*/
public void putContext(Class<?> key, Object contextObject) {
Objects.requireNonNull(key);
Objects.requireNonNull(contextObject);
if (this.map == null) {
this.map = new HashMap<>();
}
this.map.put(key, contextObject);
}
/**
* Obtain the context object for the given key.
*
* @param key The key of the required context object
*
* @return The value of the context object associated with the given key
*
* @throws NullPointerException
* If the supplied key is <code>null</code>
*/
public Object getContext(Class<?> key) {
Objects.requireNonNull(key);
if (this.map == null) {
return null;
}
return this.map.get(key);
}
public abstract ELResolver getELResolver();
/**
* Obtain the ImportHandler for this ELContext, creating one if necessary.
* This method is not thread-safe.
*
* @return the ImportHandler for this ELContext.
*
* @since EL 3.0
*/
public ImportHandler getImportHandler() {
if (importHandler == null) {
importHandler = new ImportHandler();
}
return importHandler;
}
public abstract FunctionMapper getFunctionMapper();
public Locale getLocale() {
return this.locale;
}
public void setLocale(Locale locale) {
this.locale = locale;
}
public abstract VariableMapper getVariableMapper();
/**
* Register an EvaluationListener with this ELContext.
*
* @param listener The EvaluationListener to register
*
* @since EL 3.0
*/
public void addEvaluationListener(EvaluationListener listener) {
listeners.add(listener);
}
/**
* Obtain the list of registered EvaluationListeners.
*
* @return A list of the EvaluationListener registered with this ELContext
*
* @since EL 3.0
*/
public List<EvaluationListener> getEvaluationListeners() {
return listeners;
}
/**
* Notify interested listeners that an expression will be evaluated.
*
* @param expression The expression that will be evaluated
*
* @since EL 3.0
*/
public void notifyBeforeEvaluation(String expression) {
for (EvaluationListener listener : listeners) {
try {
listener.beforeEvaluation(this, expression);
} catch (Throwable t) {
Util.handleThrowable(t);
// Ignore - no option to log
}
}
}
/**
* Notify interested listeners that an expression has been evaluated.
*
* @param expression The expression that was evaluated
*
* @since EL 3.0
*/
public void notifyAfterEvaluation(String expression) {
for (EvaluationListener listener : listeners) {
try {
listener.afterEvaluation(this, expression);
} catch (Throwable t) {
Util.handleThrowable(t);
// Ignore - no option to log
}
}
}
/**
* Notify interested listeners that a property has been resolved.
*
* @param base The object on which the property was resolved
* @param property The property that was resolved
*
* @since EL 3.0
*/
public void notifyPropertyResolved(Object base, Object property) {
for (EvaluationListener listener : listeners) {
try {
listener.propertyResolved(this, base, property);
} catch (Throwable t) {
Util.handleThrowable(t);
// Ignore - no option to log
}
}
}
/**
* Determine if the specified name is recognised as the name of a lambda
* argument.
*
* @param name The name of the lambda argument
*
* @return <code>true</code> if the name is recognised as the name of a
* lambda argument, otherwise <code>false</code>
*
* @since EL 3.0
*/
public boolean isLambdaArgument(String name) {
for (Map<String,Object> arguments : lambdaArguments) {
if (arguments.containsKey(name)) {
return true;
}
}
return false;
}
/**
* Obtain the value of the lambda argument with the given name.
*
* @param name The name of the lambda argument
*
* @return The value of the specified argument
*
* @since EL 3.0
*/
public Object getLambdaArgument(String name) {
for (Map<String,Object> arguments : lambdaArguments) {
Object result = arguments.get(name);
if (result != null) {
return result;
}
}
return null;
}
/**
* Called when starting to evaluate a lambda expression so that the
* arguments are available to the EL context during evaluation.
*
* @param arguments The arguments in scope for the current lambda
* expression.
* @since EL 3.0
*/
public void enterLambdaScope(Map<String,Object> arguments) {
lambdaArguments.push(arguments);
}
/**
* Called after evaluating a lambda expression to signal that the arguments
* are no longer required.
*
* @since EL 3.0
*/
public void exitLambdaScope() {
lambdaArguments.pop();
}
/**
* Coerce the supplied object to the requested type.
*
* @param obj The object to be coerced
* @param type The type to which the object should be coerced
*
* @return An instance of the requested type.
*
* @throws ELException
* If the conversion fails
*
* @since EL 3.0
*/
public Object convertToType(Object obj, Class<?> type) {
boolean originalResolved = isPropertyResolved();
setPropertyResolved(false);
try {
ELResolver resolver = getELResolver();
if (resolver != null) {
Object result = resolver.convertToType(this, obj, type);
if (isPropertyResolved()) {
return result;
}
}
} finally {
setPropertyResolved(originalResolved);
}
return ELManager.getExpressionFactory().coerceToType(obj, type);
}
}
/*
* 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.
*/
package jakarta.el;
import java.util.EventObject;
public class ELContextEvent extends EventObject {
private static final long serialVersionUID = 1255131906285426769L;
/**
* @param source The EL context that was the source of this event
*/
public ELContextEvent(ELContext source) {
super(source);
}
public ELContext getELContext() {
return (ELContext) this.getSource();
}
}
/*
* 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.
*/
package jakarta.el;
/**
* @author Jacob Hookom [jacob/hookom.net]
*
*/
public interface ELContextListener extends java.util.EventListener {
public void contextCreated(ELContextEvent event);
}
/*
* 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.
*/
package jakarta.el;
/**
* Represents any of the exception conditions that can arise during expression
* evaluation.
*
* @since 2.1
*/
public class ELException extends RuntimeException {
private static final long serialVersionUID = -6228042809457459161L;
/**
* Creates an ELException with no detail message
*/
public ELException() {
super();
}
/**
* Creates an ELException with the provided detail message.
*
* @param message
* the detail message
*/
public ELException(String message) {
super(message);
}
/**
* Creates an ELException with the given cause
*
* @param cause
* the originating cause of this exception
*/
public ELException(Throwable cause) {
super(cause);
}
/**
* Creates an ELException with the given detail message and root cause.
*
* @param message
* the detail message
* @param cause
* the originating cause of this exception
*/
public ELException(String message, Throwable cause) {
super(message, cause);
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.Method;
import java.util.Map;
/**
* @since EL 3.0
*/
public class ELManager {
private StandardELContext context = null;
public static ExpressionFactory getExpressionFactory() {
return Util.getExpressionFactory();
}
public StandardELContext getELContext() {
if (context == null) {
context = new StandardELContext(getExpressionFactory());
}
return context;
}
public ELContext setELContext(ELContext context) {
StandardELContext oldContext = this.context;
this.context = new StandardELContext(context);
return oldContext;
}
public void addBeanNameResolver(BeanNameResolver beanNameResolver) {
getELContext().addELResolver(new BeanNameELResolver(beanNameResolver));
}
public void addELResolver(ELResolver resolver) {
getELContext().addELResolver(resolver);
}
public void mapFunction(String prefix, String function, Method method) {
getELContext().getFunctionMapper().mapFunction(
prefix, function, method);
}
public void setVariable(String variable, ValueExpression expression) {
getELContext().getVariableMapper().setVariable(variable, expression);
}
public void importStatic(String staticMemberName)
throws jakarta.el.ELException {
getELContext().getImportHandler().importStatic(staticMemberName);
}
public void importClass(String className) throws jakarta.el.ELException {
getELContext().getImportHandler().importClass(className);
}
public void importPackage(String packageName) {
getELContext().getImportHandler().importPackage(packageName);
}
public Object defineBean(String name, Object bean) {
Map<String,Object> localBeans = getELContext().getLocalBeans();
if (bean == null) {
return localBeans.remove(name);
} else {
return localBeans.put(name, bean);
}
}
public void addEvaluationListener(EvaluationListener listener) {
getELContext().addEvaluationListener(listener);
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashSet;
import java.util.Set;
/**
* @since EL 3.0
*/
public class ELProcessor {
private static final Set<String> PRIMITIVES = new HashSet<>();
static {
PRIMITIVES.add("boolean");
PRIMITIVES.add("byte");
PRIMITIVES.add("char");
PRIMITIVES.add("double");
PRIMITIVES.add("float");
PRIMITIVES.add("int");
PRIMITIVES.add("long");
PRIMITIVES.add("short");
}
private static final String[] EMPTY_STRING_ARRAY = new String[0];
private final ELManager manager = new ELManager();
private final ELContext context = manager.getELContext();
private final ExpressionFactory factory = ELManager.getExpressionFactory();
public ELManager getELManager() {
return manager;
}
public Object eval(String expression) {
return getValue(expression, Object.class);
}
public Object getValue(String expression, Class<?> expectedType) {
ValueExpression ve = factory.createValueExpression(
context, bracket(expression), expectedType);
return ve.getValue(context);
}
public void setValue(String expression, Object value) {
ValueExpression ve = factory.createValueExpression(
context, bracket(expression), Object.class);
ve.setValue(context, value);
}
public void setVariable(String variable, String expression) {
if (expression == null) {
manager.setVariable(variable, null);
} else {
ValueExpression ve = factory.createValueExpression(
context, bracket(expression), Object.class);
manager.setVariable(variable, ve);
}
}
public void defineFunction(String prefix, String function, String className,
String methodName) throws ClassNotFoundException,
NoSuchMethodException {
if (prefix == null || function == null || className == null ||
methodName == null) {
throw new NullPointerException(Util.message(
context, "elProcessor.defineFunctionNullParams"));
}
// Check the imports
Class<?> clazz = context.getImportHandler().resolveClass(className);
if (clazz == null) {
clazz = Class.forName(className, true, Util.getContextClassLoader());
}
if (!Modifier.isPublic(clazz.getModifiers())) {
throw new ClassNotFoundException(Util.message(context,
"elProcessor.defineFunctionInvalidClass", className));
}
MethodSignature sig =
new MethodSignature(context, methodName, className);
if (function.length() == 0) {
function = sig.getName();
}
// Only returns public methods. Java 9+ access is checked below.
Method methods[] = clazz.getMethods();
JreCompat jreCompat = JreCompat.getInstance();
for (Method method : methods) {
if (!Modifier.isStatic(method.getModifiers())) {
continue;
}
if (!jreCompat.canAcccess(null, method)) {
continue;
}
if (method.getName().equals(sig.getName())) {
if (sig.getParamTypeNames() == null) {
// Only a name provided, no signature so map the first
// method declared
manager.mapFunction(prefix, function, method);
return;
}
if (sig.getParamTypeNames().length != method.getParameterTypes().length) {
continue;
}
if (sig.getParamTypeNames().length == 0) {
manager.mapFunction(prefix, function, method);
return;
} else {
Class<?>[] types = method.getParameterTypes();
String[] typeNames = sig.getParamTypeNames();
if (types.length == typeNames.length) {
boolean match = true;
for (int i = 0; i < types.length; i++) {
if (i == types.length -1 && method.isVarArgs()) {
String typeName = typeNames[i];
if (typeName.endsWith("...")) {
typeName = typeName.substring(0, typeName.length() - 3);
if (!typeName.equals(types[i].getName())) {
match = false;
}
} else {
match = false;
}
} else if (!types[i].getName().equals(typeNames[i])) {
match = false;
break;
}
}
if (match) {
manager.mapFunction(prefix, function, method);
return;
}
}
}
}
}
throw new NoSuchMethodException(Util.message(context,
"elProcessor.defineFunctionNoMethod", methodName, className));
}
/**
* Map a method to a function name.
*
* @param prefix Function prefix
* @param function Function name
* @param method Method
*
* @throws NullPointerException
* If any of the arguments are null
* @throws NoSuchMethodException
* If the method is not static
*/
public void defineFunction(String prefix, String function, Method method)
throws java.lang.NoSuchMethodException {
if (prefix == null || function == null || method == null) {
throw new NullPointerException(Util.message(
context, "elProcessor.defineFunctionNullParams"));
}
int modifiers = method.getModifiers();
// Check for static, public method and module access for Java 9+
JreCompat jreCompat = JreCompat.getInstance();
if (!Modifier.isStatic(modifiers) || !jreCompat.canAcccess(null, method)) {
throw new NoSuchMethodException(Util.message(context,
"elProcessor.defineFunctionInvalidMethod", method.getName(),
method.getDeclaringClass().getName()));
}
manager.mapFunction(prefix, function, method);
}
public void defineBean(String name, Object bean) {
manager.defineBean(name, bean);
}
private static String bracket(String expression) {
return "${" + expression + "}";
}
private static class MethodSignature {
private final String name;
private final String[] parameterTypeNames;
public MethodSignature(ELContext context, String methodName,
String className) throws NoSuchMethodException {
int paramIndex = methodName.indexOf('(');
if (paramIndex == -1) {
name = methodName.trim();
parameterTypeNames = null;
} else {
String returnTypeAndName = methodName.substring(0, paramIndex).trim();
// Assume that the return type and the name are separated by
// whitespace. Given the use of trim() above, there should only
// be one sequence of whitespace characters.
int wsPos = -1;
for (int i = 0; i < returnTypeAndName.length(); i++) {
if (Character.isWhitespace(returnTypeAndName.charAt(i))) {
wsPos = i;
break;
}
}
if (wsPos == -1) {
throw new NoSuchMethodException();
}
name = returnTypeAndName.substring(wsPos).trim();
String paramString = methodName.substring(paramIndex).trim();
// We know the params start with '(', check they end with ')'
if (!paramString.endsWith(")")) {
throw new NoSuchMethodException(Util.message(context,
"elProcessor.defineFunctionInvalidParameterList",
paramString, methodName, className));
}
// Trim '(' and ')'
paramString = paramString.substring(1, paramString.length() - 1).trim();
if (paramString.length() == 0) {
parameterTypeNames = EMPTY_STRING_ARRAY;
} else {
parameterTypeNames = paramString.split(",");
ImportHandler importHandler = context.getImportHandler();
for (int i = 0; i < parameterTypeNames.length; i++) {
String parameterTypeName = parameterTypeNames[i].trim();
int dimension = 0;
int bracketPos = parameterTypeName.indexOf('[');
if (bracketPos > -1) {
String parameterTypeNameOnly =
parameterTypeName.substring(0, bracketPos).trim();
while (bracketPos > -1) {
dimension++;
bracketPos = parameterTypeName.indexOf('[', bracketPos+ 1);
}
parameterTypeName = parameterTypeNameOnly;
}
boolean varArgs = false;
if (parameterTypeName.endsWith("...")) {
varArgs = true;
dimension = 1;
parameterTypeName = parameterTypeName.substring(
0, parameterTypeName.length() -3).trim();
}
boolean isPrimitive = PRIMITIVES.contains(parameterTypeName);
if (isPrimitive && dimension > 0) {
// When in an array, class name changes for primitive
switch(parameterTypeName)
{
case "boolean":
parameterTypeName = "Z";
break;
case "byte":
parameterTypeName = "B";
break;
case "char":
parameterTypeName = "C";
break;
case "double":
parameterTypeName = "D";
break;
case "float":
parameterTypeName = "F";
break;
case "int":
parameterTypeName = "I";
break;
case "long":
parameterTypeName = "J";
break;
case "short":
parameterTypeName = "S";
break;
default:
// Should never happen
break;
}
} else if (!isPrimitive &&
!parameterTypeName.contains(".")) {
Class<?> clazz = importHandler.resolveClass(
parameterTypeName);
if (clazz == null) {
throw new NoSuchMethodException(Util.message(
context,
"elProcessor.defineFunctionInvalidParameterTypeName",
parameterTypeNames[i], methodName,
className));
}
parameterTypeName = clazz.getName();
}
if (dimension > 0) {
// Convert to array form of class name
StringBuilder sb = new StringBuilder();
for (int j = 0; j < dimension; j++) {
sb.append('[');
}
if (!isPrimitive) {
sb.append('L');
}
sb.append(parameterTypeName);
if (!isPrimitive) {
sb.append(';');
}
parameterTypeName = sb.toString();
}
if (varArgs) {
parameterTypeName += "...";
}
parameterTypeNames[i] = parameterTypeName;
}
}
}
}
public String getName() {
return name;
}
/**
* @return <code>null</code> if just the method name was specified, an
* empty List if an empty parameter list was specified - i.e. ()
* - otherwise an ordered list of parameter type names
*/
public String[] getParamTypeNames() {
return parameterTypeNames;
}
}
}
/*
* 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.
*/
package jakarta.el;
import java.util.Iterator;
/**
* @author Jacob Hookom [jacob/hookom.net]
*
*/
public abstract class ELResolver {
public static final String TYPE = "type";
public static final String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime";
/**
* @param context The EL context for this evaluation
* @param base The base object on which the property is to be found
* @param property The property whose value is to be returned
* @return the value of the provided property
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If the base/property combination provided to the resolver is
* one that the resolver can handle but no match was found or a
* match was found but was not readable
* @throws ELException
* Wraps any exception throw whilst resolving the property
*/
public abstract Object getValue(ELContext context, Object base,
Object property);
/**
* Invokes a method on the the given object. This default implementation
* always returns <code>null</code>.
*
* @param context The EL context for this evaluation
* @param base The base object on which the method is to be found
* @param method The method to invoke
* @param paramTypes The types of the parameters of the method to invoke
* @param params The parameters with which to invoke the method
*
* @return Always <code>null</code>
*
* @since EL 2.2
*/
public Object invoke(ELContext context, Object base, Object method,
Class<?>[] paramTypes, Object[] params) {
return null;
}
/**
* @param context The EL context for this evaluation
* @param base The base object on which the property is to be found
* @param property The property whose type is to be returned
* @return the type of the provided property
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If the base/property combination provided to the resolver is
* one that the resolver can handle but no match was found or a
* match was found but was not readable
* @throws ELException
* Wraps any exception throw whilst resolving the property
*/
public abstract Class<?> getType(ELContext context, Object base,
Object property);
/**
* @param context The EL context for this evaluation
* @param base The base object on which the property is to be found
* @param property The property whose value is to be set
* @param value The value to set the property to
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If the base/property combination provided to the resolver is
* one that the resolver can handle but no match was found
* @throws PropertyNotWritableException
* If the base/property combination provided to the resolver is
* one that the resolver can handle but the property was not
* writable
* @throws ELException
* Wraps any exception throw whilst resolving the property
*/
public abstract void setValue(ELContext context, Object base,
Object property, Object value);
/**
* @param context The EL context for this evaluation
* @param base The base object on which the property is to be found
* @param property The property to be checked for read only status
* @return <code>true</code> if the identified property is read only,
* otherwise <code>false</code>
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If the base/property combination provided to the resolver is
* one that the resolver can handle but no match was found
* @throws ELException
* Wraps any exception throw whilst resolving the property
*/
public abstract boolean isReadOnly(ELContext context, Object base,
Object property);
public abstract Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base);
public abstract Class<?> getCommonPropertyType(ELContext context,
Object base);
/**
* Converts the given object to the given type. This default implementation
* always returns <code>null</code>.
*
* @param context The EL context for this evaluation
* @param obj The object to convert
* @param type The type to which the object should be converted
*
* @return Always <code>null</code>
*
* @since EL 3.0
*/
public Object convertToType(ELContext context, Object obj, Class<?> type) {
context.setPropertyResolved(false);
return null;
}
}
/*
* 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.
*/
package jakarta.el;
/**
* @since EL 3.0
*/
public abstract class EvaluationListener {
/**
* Fired before the evaluation of the expression.
*
* @param context The EL context in which the expression will be
* evaluated
* @param expression The expression that will be evaluated
*/
public void beforeEvaluation(ELContext context, String expression) {
// NO-OP
}
/**
* Fired after the evaluation of the expression.
*
* @param context The EL context in which the expression was evaluated
* @param expression The expression that was evaluated
*/
public void afterEvaluation(ELContext context, String expression) {
// NO-OP
}
/**
* Fired after a property has been resolved.
*
* @param context The EL context in which the property was resolved
* @param base The base object on which the property was resolved
* @param property The property that was resolved
*/
public void propertyResolved(ELContext context, Object base, Object property) {
// NO-OP
}
}
/*
* 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.
*/
package jakarta.el;
import java.io.Serializable;
/**
*
*/
public abstract class Expression implements Serializable {
private static final long serialVersionUID = -6663767980471823812L;
public abstract String getExpressionString();
@Override
public abstract boolean equals(Object obj);
@Override
public abstract int hashCode();
public abstract boolean isLiteralText();
}
/*
* 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.
*/
package jakarta.el;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
*
* @since 2.1
*/
public abstract class ExpressionFactory {
private static final boolean IS_SECURITY_ENABLED =
(System.getSecurityManager() != null);
private static final String PROPERTY_NAME = "jakarta.el.ExpressionFactory";
private static final String PROPERTY_FILE;
private static final CacheValue nullTcclFactory = new CacheValue();
private static final Map<CacheKey, CacheValue> factoryCache = new ConcurrentHashMap<>();
static {
if (IS_SECURITY_ENABLED) {
PROPERTY_FILE = AccessController.doPrivileged(
new PrivilegedAction<String>(){
@Override
public String run() {
return System.getProperty("java.home") + File.separator +
"lib" + File.separator + "el.properties";
}
}
);
} else {
PROPERTY_FILE = System.getProperty("java.home") + File.separator + "lib" +
File.separator + "el.properties";
}
}
/**
* Create a new {@link ExpressionFactory}. The class to use is determined by
* the following search order:
* <ol>
* <li>services API (META-INF/services/jakarta.el.ExpressionFactory)</li>
* <li>$JRE_HOME/lib/el.properties - key jakarta.el.ExpressionFactory</li>
* <li>jakarta.el.ExpressionFactory</li>
* <li>Platform default implementation -
* org.apache.el.ExpressionFactoryImpl</li>
* </ol>
* @return the new ExpressionFactory
*/
public static ExpressionFactory newInstance() {
return newInstance(null);
}
/**
* Create a new {@link ExpressionFactory} passing in the provided
* {@link Properties}. Search order is the same as {@link #newInstance()}.
*
* @param properties the properties to be passed to the new instance (may be null)
* @return the new ExpressionFactory
*/
public static ExpressionFactory newInstance(Properties properties) {
ExpressionFactory result = null;
ClassLoader tccl = Util.getContextClassLoader();
CacheValue cacheValue;
Class<?> clazz;
if (tccl == null) {
cacheValue = nullTcclFactory;
} else {
CacheKey key = new CacheKey(tccl);
cacheValue = factoryCache.get(key);
if (cacheValue == null) {
CacheValue newCacheValue = new CacheValue();
cacheValue = factoryCache.putIfAbsent(key, newCacheValue);
if (cacheValue == null) {
cacheValue = newCacheValue;
}
}
}
final Lock readLock = cacheValue.getLock().readLock();
readLock.lock();
try {
clazz = cacheValue.getFactoryClass();
} finally {
readLock.unlock();
}
if (clazz == null) {
String className = null;
try {
final Lock writeLock = cacheValue.getLock().writeLock();
writeLock.lock();
try {
className = cacheValue.getFactoryClassName();
if (className == null) {
className = discoverClassName(tccl);
cacheValue.setFactoryClassName(className);
}
if (tccl == null) {
clazz = Class.forName(className);
} else {
clazz = tccl.loadClass(className);
}
cacheValue.setFactoryClass(clazz);
} finally {
writeLock.unlock();
}
} catch (ClassNotFoundException e) {
throw new ELException(Util.message(null, "expressionFactory.cannotFind", className), e);
}
}
try {
Constructor<?> constructor = null;
// Do we need to look for a constructor that will take properties?
if (properties != null) {
try {
constructor = clazz.getConstructor(Properties.class);
} catch (SecurityException se) {
throw new ELException(se);
} catch (NoSuchMethodException nsme) {
// This can be ignored
// This is OK for this constructor not to exist
}
}
if (constructor == null) {
result = (ExpressionFactory) clazz.getConstructor().newInstance();
} else {
result =
(ExpressionFactory) constructor.newInstance(properties);
}
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(Util.message(null, "expressionFactory.cannotCreate", clazz.getName()), e);
} catch (ReflectiveOperationException | IllegalArgumentException e) {
throw new ELException(Util.message(null, "expressionFactory.cannotCreate", clazz.getName()), e);
}
return result;
}
/**
* Create a new value expression.
*
* @param context The EL context for this evaluation
* @param expression The String representation of the value expression
* @param expectedType The expected type of the result of evaluating the
* expression
*
* @return A new value expression formed from the input parameters
*
* @throws NullPointerException
* If the expected type is <code>null</code>
* @throws ELException
* If there are syntax errors in the provided expression
*/
public abstract ValueExpression createValueExpression(ELContext context,
String expression, Class<?> expectedType);
public abstract ValueExpression createValueExpression(Object instance,
Class<?> expectedType);
/**
* Create a new method expression instance.
*
* @param context The EL context for this evaluation
* @param expression The String representation of the method
* expression
* @param expectedReturnType The expected type of the result of invoking the
* method
* @param expectedParamTypes The expected types of the input parameters
*
* @return A new method expression formed from the input parameters.
*
* @throws NullPointerException
* If the expected parameters types are <code>null</code>
* @throws ELException
* If there are syntax errors in the provided expression
*/
public abstract MethodExpression createMethodExpression(ELContext context,
String expression, Class<?> expectedReturnType,
Class<?>[] expectedParamTypes);
/**
* Coerce the supplied object to the requested type.
*
* @param obj The object to be coerced
* @param expectedType The type to which the object should be coerced
*
* @return An instance of the requested type.
*
* @throws ELException
* If the conversion fails
*/
public abstract Object coerceToType(Object obj, Class<?> expectedType);
/**
* @return This default implementation returns null
*
* @since EL 3.0
*/
public ELResolver getStreamELResolver() {
return null;
}
/**
* @return This default implementation returns null
*
* @since EL 3.0
*/
public Map<String,Method> getInitFunctionMap() {
return null;
}
/**
* Key used to cache ExpressionFactory discovery information per class
* loader. The class loader reference is never {@code null}, because
* {@code null} tccl is handled separately.
*/
private static class CacheKey {
private final int hash;
private final WeakReference<ClassLoader> ref;
public CacheKey(ClassLoader cl) {
hash = cl.hashCode();
ref = new WeakReference<>(cl);
}
@Override
public int hashCode() {
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CacheKey)) {
return false;
}
ClassLoader thisCl = ref.get();
if (thisCl == null) {
return false;
}
return thisCl == ((CacheKey) obj).ref.get();
}
}
private static class CacheValue {
private final ReadWriteLock lock = new ReentrantReadWriteLock();
private String className;
private WeakReference<Class<?>> ref;
public CacheValue() {
}
public ReadWriteLock getLock() {
return lock;
}
public String getFactoryClassName() {
return className;
}
public void setFactoryClassName(String className) {
this.className = className;
}
public Class<?> getFactoryClass() {
return ref != null ? ref.get() : null;
}
public void setFactoryClass(Class<?> clazz) {
ref = new WeakReference<>(clazz);
}
}
/**
* Discover the name of class that implements ExpressionFactory.
*
* @param tccl
* {@code ClassLoader}
* @return Class name. There is default, so it is never {@code null}.
*/
private static String discoverClassName(ClassLoader tccl) {
String className = null;
// First services API
className = getClassNameServices(tccl);
if (className == null) {
if (IS_SECURITY_ENABLED) {
className = AccessController.doPrivileged(
new PrivilegedAction<String>() {
@Override
public String run() {
return getClassNameJreDir();
}
}
);
} else {
// Second el.properties file
className = getClassNameJreDir();
}
}
if (className == null) {
if (IS_SECURITY_ENABLED) {
className = AccessController.doPrivileged(
new PrivilegedAction<String>() {
@Override
public String run() {
return getClassNameSysProp();
}
}
);
} else {
// Third system property
className = getClassNameSysProp();
}
}
if (className == null) {
// Fourth - default
className = "org.apache.el.ExpressionFactoryImpl";
}
return className;
}
private static String getClassNameServices(ClassLoader tccl) {
ExpressionFactory result = null;
ServiceLoader<ExpressionFactory> serviceLoader = ServiceLoader.load(ExpressionFactory.class, tccl);
Iterator<ExpressionFactory> iter = serviceLoader.iterator();
while (result == null && iter.hasNext()) {
result = iter.next();
}
if (result == null) {
return null;
}
return result.getClass().getName();
}
private static String getClassNameJreDir() {
File file = new File(PROPERTY_FILE);
if (file.canRead()) {
try (InputStream is = new FileInputStream(file)){
Properties props = new Properties();
props.load(is);
String value = props.getProperty(PROPERTY_NAME);
if (value != null && value.trim().length() > 0) {
return value.trim();
}
} catch (FileNotFoundException e) {
// Should not happen - ignore it if it does
} catch (IOException e) {
throw new ELException(Util.message(null, "expressionFactory.readFailed", PROPERTY_FILE), e);
}
}
return null;
}
private static final String getClassNameSysProp() {
String value = System.getProperty(PROPERTY_NAME);
if (value != null && value.trim().length() > 0) {
return value.trim();
}
return null;
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.Method;
public abstract class FunctionMapper {
public abstract Method resolveFunction(String prefix, String localName);
/**
* Map a method to a function name.
*
* @param prefix Function prefix
* @param localName Function name
* @param method Method
*
* @since EL 3.0
*/
public void mapFunction(String prefix, String localName, Method method) {
// NO-OP
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* @since EL 3.0
*/
public class ImportHandler {
private static final Map<String,Set<String>> standardPackages = new HashMap<>();
static {
// Servlet 5.0
Set<String> servletClassNames = new HashSet<>();
// Interfaces
servletClassNames.add("AsyncContext");
servletClassNames.add("AsyncListener");
servletClassNames.add("Filter");
servletClassNames.add("FilterChain");
servletClassNames.add("FilterConfig");
servletClassNames.add("FilterRegistration");
servletClassNames.add("FilterRegistration.Dynamic");
servletClassNames.add("ReadListener");
servletClassNames.add("Registration");
servletClassNames.add("Registration.Dynamic");
servletClassNames.add("RequestDispatcher");
servletClassNames.add("Servlet");
servletClassNames.add("ServletConfig");
servletClassNames.add("ServletContainerInitializer");
servletClassNames.add("ServletContext");
servletClassNames.add("ServletContextAttributeListener");
servletClassNames.add("ServletContextListener");
servletClassNames.add("ServletRegistration");
servletClassNames.add("ServletRegistration.Dynamic");
servletClassNames.add("ServletRequest");
servletClassNames.add("ServletRequestAttributeListener");
servletClassNames.add("ServletRequestListener");
servletClassNames.add("ServletResponse");
servletClassNames.add("SessionCookieConfig");
servletClassNames.add("SingleThreadModel");
servletClassNames.add("WriteListener");
// Classes
servletClassNames.add("AsyncEvent");
servletClassNames.add("GenericFilter");
servletClassNames.add("GenericServlet");
servletClassNames.add("HttpConstraintElement");
servletClassNames.add("HttpMethodConstraintElement");
servletClassNames.add("MultipartConfigElement");
servletClassNames.add("ServletContextAttributeEvent");
servletClassNames.add("ServletContextEvent");
servletClassNames.add("ServletInputStream");
servletClassNames.add("ServletOutputStream");
servletClassNames.add("ServletRequestAttributeEvent");
servletClassNames.add("ServletRequestEvent");
servletClassNames.add("ServletRequestWrapper");
servletClassNames.add("ServletResponseWrapper");
servletClassNames.add("ServletSecurityElement");
// Enums
servletClassNames.add("DispatcherType");
servletClassNames.add("SessionTrackingMode");
// Exceptions
servletClassNames.add("ServletException");
servletClassNames.add("UnavailableException");
standardPackages.put("jakarta.servlet", servletClassNames);
// Servlet 5.0
Set<String> servletHttpClassNames = new HashSet<>();
// Interfaces
servletHttpClassNames.add("HttpServletMapping");
servletHttpClassNames.add("HttpServletRequest");
servletHttpClassNames.add("HttpServletResponse");
servletHttpClassNames.add("HttpSession");
servletHttpClassNames.add("HttpSessionActivationListener");
servletHttpClassNames.add("HttpSessionAttributeListener");
servletHttpClassNames.add("HttpSessionBindingListener");
servletHttpClassNames.add("HttpSessionContext");
servletHttpClassNames.add("HttpSessionIdListener");
servletHttpClassNames.add("HttpSessionListener");
servletHttpClassNames.add("HttpUpgradeHandler");
servletHttpClassNames.add("Part");
servletHttpClassNames.add("PushBuilder");
servletHttpClassNames.add("WebConnection");
// Classes
servletHttpClassNames.add("Cookie");
servletHttpClassNames.add("HttpFilter");
servletHttpClassNames.add("HttpServlet");
servletHttpClassNames.add("HttpServletRequestWrapper");
servletHttpClassNames.add("HttpServletResponseWrapper");
servletHttpClassNames.add("HttpSessionBindingEvent");
servletHttpClassNames.add("HttpSessionEvent");
servletHttpClassNames.add("HttpUtils");
// Enums
servletHttpClassNames.add("MappingMatch");
standardPackages.put("jakarta.servlet.http", servletHttpClassNames);
// JSP 3.0
Set<String> servletJspClassNames = new HashSet<>();
//Interfaces
servletJspClassNames.add("HttpJspPage");
servletJspClassNames.add("JspApplicationContext");
servletJspClassNames.add("JspPage");
// Classes
servletJspClassNames.add("ErrorData");
servletJspClassNames.add("JspContext");
servletJspClassNames.add("JspEngineInfo");
servletJspClassNames.add("JspFactory");
servletJspClassNames.add("JspWriter");
servletJspClassNames.add("PageContext");
servletJspClassNames.add("Exceptions");
servletJspClassNames.add("JspException");
servletJspClassNames.add("JspTagException");
servletJspClassNames.add("SkipPageException");
standardPackages.put("jakarta.servlet.jsp", servletJspClassNames);
Set<String> javaLangClassNames = new HashSet<>();
// Taken from Java 14 EA27 Javadoc
// Interfaces
javaLangClassNames.add("Appendable");
javaLangClassNames.add("AutoCloseable");
javaLangClassNames.add("CharSequence");
javaLangClassNames.add("Cloneable");
javaLangClassNames.add("Comparable");
javaLangClassNames.add("Iterable");
javaLangClassNames.add("ProcessHandle");
javaLangClassNames.add("ProcessHandle.Info");
javaLangClassNames.add("Readable");
javaLangClassNames.add("Runnable");
javaLangClassNames.add("StackWalker.StackFrame");
javaLangClassNames.add("System.Logger");
javaLangClassNames.add("Thread.UncaughtExceptionHandler");
//Classes
javaLangClassNames.add("Boolean");
javaLangClassNames.add("Byte");
javaLangClassNames.add("Character");
javaLangClassNames.add("Character.Subset");
javaLangClassNames.add("Character.UnicodeBlock");
javaLangClassNames.add("Class");
javaLangClassNames.add("ClassLoader");
javaLangClassNames.add("ClassValue");
javaLangClassNames.add("Compiler");
javaLangClassNames.add("Double");
javaLangClassNames.add("Enum");
javaLangClassNames.add("Enum.EnumDesc");
javaLangClassNames.add("Float");
javaLangClassNames.add("InheritableThreadLocal");
javaLangClassNames.add("Integer");
javaLangClassNames.add("Long");
javaLangClassNames.add("Math");
javaLangClassNames.add("Module");
javaLangClassNames.add("ModuleLayer");
javaLangClassNames.add("ModuleLayer.Controller");
javaLangClassNames.add("Number");
javaLangClassNames.add("Object");
javaLangClassNames.add("Package");
javaLangClassNames.add("Process");
javaLangClassNames.add("ProcessBuilder");
javaLangClassNames.add("ProcessBuilder.Redirect");
javaLangClassNames.add("Record");
javaLangClassNames.add("Runtime");
javaLangClassNames.add("Runtime.Version");
javaLangClassNames.add("RuntimePermission");
javaLangClassNames.add("SecurityManager");
javaLangClassNames.add("Short");
javaLangClassNames.add("StackTraceElement");
javaLangClassNames.add("StackWalker");
javaLangClassNames.add("StrictMath");
javaLangClassNames.add("String");
javaLangClassNames.add("StringBuffer");
javaLangClassNames.add("StringBuilder");
javaLangClassNames.add("System");
javaLangClassNames.add("System.LoggerFinder");
javaLangClassNames.add("Thread");
javaLangClassNames.add("ThreadGroup");
javaLangClassNames.add("ThreadLocal");
javaLangClassNames.add("Throwable");
javaLangClassNames.add("Void");
//Enums
javaLangClassNames.add("Character.UnicodeScript");
javaLangClassNames.add("ProcessBuilder.Redirect.Type");
javaLangClassNames.add("StackWalker.Option");
javaLangClassNames.add("System.Logger.Level");
javaLangClassNames.add("Thread.State");
//Exceptions
javaLangClassNames.add("ArithmeticException");
javaLangClassNames.add("ArrayIndexOutOfBoundsException");
javaLangClassNames.add("ArrayStoreException");
javaLangClassNames.add("ClassCastException");
javaLangClassNames.add("ClassNotFoundException");
javaLangClassNames.add("CloneNotSupportedException");
javaLangClassNames.add("EnumConstantNotPresentException");
javaLangClassNames.add("Exception");
javaLangClassNames.add("IllegalAccessException");
javaLangClassNames.add("IllegalArgumentException");
javaLangClassNames.add("IllegalCallerException");
javaLangClassNames.add("IllegalMonitorStateException");
javaLangClassNames.add("IllegalStateException");
javaLangClassNames.add("IllegalThreadStateException");
javaLangClassNames.add("IndexOutOfBoundsException");
javaLangClassNames.add("InstantiationException");
javaLangClassNames.add("InterruptedException");
javaLangClassNames.add("LayerInstantiationException");
javaLangClassNames.add("NegativeArraySizeException");
javaLangClassNames.add("NoSuchFieldException");
javaLangClassNames.add("NoSuchMethodException");
javaLangClassNames.add("NullPointerException");
javaLangClassNames.add("NumberFormatException");
javaLangClassNames.add("ReflectiveOperationException");
javaLangClassNames.add("RuntimeException");
javaLangClassNames.add("SecurityException");
javaLangClassNames.add("StringIndexOutOfBoundsException");
javaLangClassNames.add("TypeNotPresentException");
javaLangClassNames.add("UnsupportedOperationException");
//Errors
javaLangClassNames.add("AbstractMethodError");
javaLangClassNames.add("AssertionError");
javaLangClassNames.add("BootstrapMethodError");
javaLangClassNames.add("ClassCircularityError");
javaLangClassNames.add("ClassFormatError");
javaLangClassNames.add("Error");
javaLangClassNames.add("ExceptionInInitializerError");
javaLangClassNames.add("IllegalAccessError");
javaLangClassNames.add("IncompatibleClassChangeError");
javaLangClassNames.add("InstantiationError");
javaLangClassNames.add("InternalError");
javaLangClassNames.add("LinkageError");
javaLangClassNames.add("NoClassDefFoundError");
javaLangClassNames.add("NoSuchFieldError");
javaLangClassNames.add("NoSuchMethodError");
javaLangClassNames.add("OutOfMemoryError");
javaLangClassNames.add("StackOverflowError");
javaLangClassNames.add("ThreadDeath");
javaLangClassNames.add("UnknownError");
javaLangClassNames.add("UnsatisfiedLinkError");
javaLangClassNames.add("UnsupportedClassVersionError");
javaLangClassNames.add("VerifyError");
javaLangClassNames.add("VirtualMachineError");
//Annotation Types
javaLangClassNames.add("Deprecated");
javaLangClassNames.add("FunctionalInterface");
javaLangClassNames.add("Override");
javaLangClassNames.add("SafeVarargs");
javaLangClassNames.add("SuppressWarnings");
standardPackages.put("java.lang", javaLangClassNames);
}
private Map<String,Set<String>> packageNames = new ConcurrentHashMap<>();
private Map<String,String> classNames = new ConcurrentHashMap<>();
private Map<String,Class<?>> clazzes = new ConcurrentHashMap<>();
private Map<String,Class<?>> statics = new ConcurrentHashMap<>();
public ImportHandler() {
importPackage("java.lang");
}
public void importStatic(String name) throws jakarta.el.ELException {
int lastPeriod = name.lastIndexOf('.');
if (lastPeriod < 0) {
throw new ELException(Util.message(
null, "importHandler.invalidStaticName", name));
}
String className = name.substring(0, lastPeriod);
String fieldOrMethodName = name.substring(lastPeriod + 1);
Class<?> clazz = findClass(className, true);
if (clazz == null) {
throw new ELException(Util.message(
null, "importHandler.invalidClassNameForStatic",
className, name));
}
boolean found = false;
for (Field field : clazz.getFields()) {
if (field.getName().equals(fieldOrMethodName)) {
int modifiers = field.getModifiers();
if (Modifier.isStatic(modifiers) &&
Modifier.isPublic(modifiers)) {
found = true;
break;
}
}
}
if (!found) {
for (Method method : clazz.getMethods()) {
if (method.getName().equals(fieldOrMethodName)) {
int modifiers = method.getModifiers();
if (Modifier.isStatic(modifiers) &&
Modifier.isPublic(modifiers)) {
found = true;
break;
}
}
}
}
if (!found) {
throw new ELException(Util.message(null,
"importHandler.staticNotFound", fieldOrMethodName,
className, name));
}
Class<?> conflict = statics.get(fieldOrMethodName);
if (conflict != null) {
throw new ELException(Util.message(null,
"importHandler.ambiguousStaticImport", name,
conflict.getName() + '.' + fieldOrMethodName));
}
statics.put(fieldOrMethodName, clazz);
}
public void importClass(String name) throws jakarta.el.ELException {
int lastPeriodIndex = name.lastIndexOf('.');
if (lastPeriodIndex < 0) {
throw new ELException(Util.message(
null, "importHandler.invalidClassName", name));
}
String unqualifiedName = name.substring(lastPeriodIndex + 1);
String currentName = classNames.putIfAbsent(unqualifiedName, name);
if (currentName != null && !currentName.equals(name)) {
// Conflict. Same unqualifiedName, different fully qualified names
throw new ELException(Util.message(null,
"importHandler.ambiguousImport", name, currentName));
}
}
public void importPackage(String name) {
// Import ambiguity is handled at resolution, not at import
// Whether the package exists is not checked,
// a) for sake of performance when used in JSPs (BZ 57142),
// b) java.lang.Package.getPackage(name) is not reliable (BZ 57574),
// c) such check is not required by specification.
Set<String> preloaded = standardPackages.get(name);
if (preloaded == null) {
packageNames.put(name, Collections.emptySet());
} else {
packageNames.put(name, preloaded);
}
}
public java.lang.Class<?> resolveClass(String name) {
if (name == null || name.contains(".")) {
return null;
}
// Has it been previously resolved?
Class<?> result = clazzes.get(name);
if (result != null) {
if (NotFound.class.equals(result)) {
return null;
} else {
return result;
}
}
// Search the class imports
String className = classNames.get(name);
if (className != null) {
Class<?> clazz = findClass(className, true);
if (clazz != null) {
clazzes.put(name, clazz);
return clazz;
}
}
// Search the package imports - note there may be multiple matches
// (which correctly triggers an error)
for (Map.Entry<String,Set<String>> entry : packageNames.entrySet()) {
if (!entry.getValue().isEmpty()) {
// Standard package where we know all the class names
if (!entry.getValue().contains(name)) {
// Requested name isn't in the list so it isn't in this
// package so move on to next package. This allows the
// class loader look-up to be skipped.
continue;
}
}
className = entry.getKey() + '.' + name;
Class<?> clazz = findClass(className, false);
if (clazz != null) {
if (result != null) {
throw new ELException(Util.message(null,
"importHandler.ambiguousImport", className,
result.getName()));
}
result = clazz;
}
}
if (result == null) {
// Cache NotFound results to save repeated calls to findClass()
// which is relatively slow
clazzes.put(name, NotFound.class);
} else {
clazzes.put(name, result);
}
return result;
}
public java.lang.Class<?> resolveStatic(String name) {
return statics.get(name);
}
private Class<?> findClass(String name, boolean throwException) {
Class<?> clazz;
ClassLoader cl = Util.getContextClassLoader();
String path = name.replace('.', '/') + ".class";
try {
/* Given that findClass() has to be called for every imported
* package and that getResource() is a lot faster then loadClass()
* for resources that don't exist, the overhead of the getResource()
* for the case where the class does exist is a lot less than the
* overhead we save by not calling loadClass().
*/
if (cl.getResource(path) == null) {
return null;
}
} catch (ClassCircularityError cce) {
// May happen under a security manager. Ignore it and try loading
// the class normally.
}
try {
clazz = cl.loadClass(name);
} catch (ClassNotFoundException e) {
return null;
}
// Class must be public, non-abstract, not an interface and (for
// Java 9+) in an exported package
JreCompat jreCompat = JreCompat.getInstance();
int modifiers = clazz.getModifiers();
if (!Modifier.isPublic(modifiers) || Modifier.isAbstract(modifiers) ||
Modifier.isInterface(modifiers) || !jreCompat.isExported(clazz)) {
if (throwException) {
throw new ELException(Util.message(
null, "importHandler.invalidClass", name));
} else {
return null;
}
}
return clazz;
}
/*
* Marker class used because null values are not permitted in a
* ConcurrentHashMap.
*/
private static class NotFound {
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;
/*
* This is a cut down version of org.apache.tomcat.util.Jre9Compat that provides
* only the methods required by the EL implementation.
*
* This class is duplicated in org.apache.el.util
* When making changes keep the two in sync.
*/
class Jre9Compat extends JreCompat {
private static final Method canAccessMethod;
private static final Method getModuleMethod;
private static final Method isExportedMethod;
static {
Method m1 = null;
Method m2 = null;
Method m3 = null;
try {
m1 = AccessibleObject.class.getMethod("canAccess", Object.class);
m2 = Class.class.getMethod("getModule");
Class<?> moduleClass = Class.forName("java.lang.Module");
m3 = moduleClass.getMethod("isExported", String.class);
} catch (NoSuchMethodException e) {
// Expected for Java 8
} catch (ClassNotFoundException e) {
// Can't log this so...
throw new RuntimeException(e);
}
canAccessMethod = m1;
getModuleMethod = m2;
isExportedMethod = m3;
}
public static boolean isSupported() {
return canAccessMethod != null;
}
@Override
public boolean canAcccess(Object base, AccessibleObject accessibleObject) {
try {
return ((Boolean) canAccessMethod.invoke(accessibleObject, base)).booleanValue();
} catch (ReflectiveOperationException | IllegalArgumentException e) {
return false;
}
}
@Override
public boolean isExported(Class<?> type) {
try {
String packageName = type.getPackage().getName();
Object module = getModuleMethod.invoke(type);
return ((Boolean) isExportedMethod.invoke(module, packageName)).booleanValue();
} catch (ReflectiveOperationException e) {
return false;
}
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.AccessibleObject;
/*
* This is cut down version of org.apache.tomcat.util.JreCompat that provides
* only the methods required by the EL implementation.
*
* This class is duplicated in org.apache.el.util
* When making changes keep the two in sync.
*/
class JreCompat {
private static final JreCompat instance;
static {
if (Jre9Compat.isSupported()) {
instance = new Jre9Compat();
} else {
instance = new JreCompat();
}
}
public static JreCompat getInstance() {
return instance;
}
/**
* Is the accessibleObject accessible (as a result of appropriate module
* exports) on the provided instance?
*
* @param base The specific instance to be tested.
* @param accessibleObject The method/field/constructor to be tested.
*
* @return {code true} if the AccessibleObject can be accessed otherwise
* {code false}
*/
public boolean canAcccess(Object base, AccessibleObject accessibleObject) {
// Java 8 doesn't support modules so default to true
return true;
}
/**
* Is the given class in an exported package?
*
* @param type The class to test
*
* @return Always {@code true} for Java 8. {@code true} if the enclosing
* package is exported for Java 9+
*/
public boolean isExported(Class<?> type) {
return true;
}
}
/*
* 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.
*/
package jakarta.el;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public class LambdaExpression {
private final List<String> formalParameters;
private final ValueExpression expression;
private final Map<String,Object> nestedArguments = new HashMap<>();
private ELContext context = null;
public LambdaExpression(List<String> formalParameters,
ValueExpression expression) {
this.formalParameters = formalParameters;
this.expression = expression;
}
public void setELContext(ELContext context) {
this.context = context;
}
@SuppressWarnings("null") // args[i] can't be null due to earlier checks
public Object invoke(ELContext context, Object... args)
throws ELException {
Objects.requireNonNull(context);
int formalParamCount = 0;
if (formalParameters != null) {
formalParamCount = formalParameters.size();
}
int argCount = 0;
if (args != null) {
argCount = args.length;
}
if (formalParamCount > argCount) {
throw new ELException(Util.message(context,
"lambdaExpression.tooFewArgs",
Integer.valueOf(argCount),
Integer.valueOf(formalParamCount)));
}
// Build the argument map
// Start with the arguments from any outer expressions so if there is
// any overlap the local arguments have priority
Map<String,Object> lambdaArguments = new HashMap<>();
lambdaArguments.putAll(nestedArguments);
for (int i = 0; i < formalParamCount; i++) {
lambdaArguments.put(formalParameters.get(i), args[i]);
}
context.enterLambdaScope(lambdaArguments);
try {
Object result = expression.getValue(context);
// Make arguments from this expression available to any nested
// expression
if (result instanceof LambdaExpression) {
((LambdaExpression) result).nestedArguments.putAll(
lambdaArguments);
}
return result;
} finally {
context.exitLambdaScope();
}
}
public java.lang.Object invoke(Object... args) {
return invoke (context, args);
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
public class ListELResolver extends ELResolver {
private final boolean readOnly;
private static final Class<?> UNMODIFIABLE =
Collections.unmodifiableList(new ArrayList<>()).getClass();
public ListELResolver() {
this.readOnly = false;
}
public ListELResolver(boolean readOnly) {
this.readOnly = readOnly;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof List<?>) {
context.setPropertyResolved(base, property);
List<?> list = (List<?>) base;
int idx = coerce(property);
if (idx < 0 || idx >= list.size()) {
throw new PropertyNotFoundException(
new ArrayIndexOutOfBoundsException(idx).getMessage());
}
return Object.class;
}
return null;
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof List<?>) {
context.setPropertyResolved(base, property);
List<?> list = (List<?>) base;
int idx = coerce(property);
if (idx < 0 || idx >= list.size()) {
return null;
}
return list.get(idx);
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base instanceof List<?>) {
context.setPropertyResolved(base, property);
@SuppressWarnings("unchecked") // Must be OK to cast to Object
List<Object> list = (List<Object>) base;
if (this.readOnly) {
throw new PropertyNotWritableException(Util.message(context,
"resolverNotWriteable", base.getClass().getName()));
}
int idx = coerce(property);
try {
list.set(idx, value);
} catch (UnsupportedOperationException e) {
throw new PropertyNotWritableException(e);
} catch (IndexOutOfBoundsException e) {
throw new PropertyNotFoundException(e);
}
}
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof List<?>) {
context.setPropertyResolved(base, property);
List<?> list = (List<?>) base;
try {
int idx = coerce(property);
if (idx < 0 || idx >= list.size()) {
throw new PropertyNotFoundException(
new ArrayIndexOutOfBoundsException(idx)
.getMessage());
}
} catch (IllegalArgumentException e) {
// ignore
}
return this.readOnly || UNMODIFIABLE.equals(list.getClass());
}
return this.readOnly;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base instanceof List<?>) { // implies base != null
return Integer.class;
}
return null;
}
private static final int coerce(Object property) {
if (property instanceof Number) {
return ((Number) property).intValue();
}
if (property instanceof Character) {
return ((Character) property).charValue();
}
if (property instanceof Boolean) {
return ((Boolean) property).booleanValue() ? 1 : 0;
}
if (property instanceof String) {
return Integer.parseInt((String) property);
}
throw new IllegalArgumentException(property != null ?
property.toString() : "null");
}
}
# 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.
beanNameELResolver.beanReadOnly=The bean name [{0}] is read-only
elProcessor.defineFunctionInvalidClass=The class [{0}] is not public
elProcessor.defineFunctionInvalidMethod=The method [{0}] on class [{1}] is not a public static method
elProcessor.defineFunctionInvalidParameterList=The parameter list [{0}] for method [{1}] on class [{2}] is not valid
elProcessor.defineFunctionInvalidParameterTypeName=The parameter type [{0}] for method [{1}] on class [{2}] is not valid
elProcessor.defineFunctionNoMethod=A public static method [{0}] on class [{1}] could not be found
elProcessor.defineFunctionNullParams=One or more of the input parameters was null
expressionFactory.cannotCreate=Unable to create ExpressionFactory of type [{0}]
expressionFactory.cannotFind=Unable to find ExpressionFactory of type [{0}]
expressionFactory.readFailed=Failed to read [{0}]
importHandler.ambiguousImport=The class [{0}] could not be imported as it conflicts with [{1}] which has already been imported
importHandler.ambiguousStaticImport=The static import [{0}] could not be processed as it conflicts with [{1}] which has already been imported
importHandler.classNotFound=The class [{0}] could not be imported as it could not be found
importHandler.invalidClass=The class [{0}] must be public, in an exported package (for Java 9+), non-abstract and not an interface
importHandler.invalidClassName=Name of class to import [{0}] must include a package
importHandler.invalidClassNameForStatic=The class [{0}] specified for static import [{1}] is not valid
importHandler.invalidStaticName=Name of static method or field to import [{0}] must include a class
importHandler.staticNotFound=The static import [{0}] could not be found in class [{1}] for import [{2}]
lambdaExpression.tooFewArgs=Only [{0}] arguments were provided for a lambda expression that requires at least [{1}]
objectNotAssignable=Unable to add an object of type [{0}] to an array of objects of type [{1}]
propertyNotFound=Property [{1}] not found on type [{0}]
propertyNotReadable=Property [{1}] not readable on type [{0}]
propertyNotWritable=Property [{1}] not writable on type [{0}]
propertyReadError=Error reading [{1}] on type [{0}]
propertyWriteError=Error writing [{1}] on type [{0}]
staticFieldELResolver.methodNotFound=No matching public static method named [{0}] found on class [{1}]
staticFieldELResolver.notFound=No public static field named [{0}] was found on (exported for Java 9+) class [{1}]
staticFieldELResolver.notWriteable=Writing to static fields (in this case field [{0}] on class [{1}]) is not permitted
util.method.ambiguous=Unable to find unambiguous method: {0}.{1}({2})
util.method.notfound=Method not found: {0}.{1}({2})
# 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.
elProcessor.defineFunctionInvalidMethod=Metoda [{0}] třídy [{1}] není public static metoda
importHandler.ambiguousStaticImport=Statický import [{0}] nelze zpracovat, neboť koliduje s [{1}] (který byl již naimportován)
importHandler.classNotFound=Třídu [{0}] nelze naimportovat, neboť nebyla nalezena
importHandler.invalidClassNameForStatic=Uvedená třída [{0}] pro statický import [{1}] není platná
# 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.
elProcessor.defineFunctionInvalidClass=Die Klasse [{0}] ist nicht öffentlich
elProcessor.defineFunctionInvalidMethod=Die Methode [{0}] der Klasse [{1}] ist nicht public static
expressionFactory.cannotFind=Kann die ExpressionFactory mit dem Typ [{0}] nicht finden
importHandler.classNotFound=Die Klasse [{0}] konnte nicht importiert werden, da sie nicht gefunden werden konnte
importHandler.invalidClassNameForStatic=Ungültige Klasse [{0}] für angegebenen static import [{1}]
# 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.
elProcessor.defineFunctionInvalidMethod=El método [{0}] en la clase [{1}] no es un método estático público
importHandler.ambiguousStaticImport=La importación estática [{0}] no puede ser procesada pues entra en conflicto con [{1}] la cual ya ha sido importada
importHandler.classNotFound=La clase [{0}] no puede ser importada debido a que no fué encontrada
importHandler.invalidClassNameForStatic=La clase [{0}] especificada para importación estática [{1}] no es valida
importHandler.staticNotFound=La importación estática [{0}] no se pudo encontrar en la clase [{1}] para importar [{2}]
objectNotAssignable=No puedo añadir un objeto del tipo [{0}] a un arreglo de objetos del tipo [{1}]
propertyNotFound=Propiedad [{1}] no hallada en el tipo [{0}]
propertyNotReadable=Propiedad [{1}] no legible para el tipo [{0}]
propertyNotWritable=Propiedad [{1}] no grabable para el tipo [{0}]
propertyReadError=Error reading [{1}] en el tipo [{0}]
propertyWriteError=Error writing [{1}] en el tipo [{0}]
# 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.
beanNameELResolver.beanReadOnly=Le nom de bean [{0}] est en lecture seule
elProcessor.defineFunctionInvalidClass=La classe [{0}] n''est pas publique
elProcessor.defineFunctionInvalidMethod=La méthode [{0}] sur la classe [{1}] n''est pas une méthode statique publique
elProcessor.defineFunctionInvalidParameterList=La liste de paramètres [{0}] pour la méthode [{1}] de la classe [{2}] n''est pas valide
elProcessor.defineFunctionInvalidParameterTypeName=Le type [{0}] du paramètre de la méthode [{1}] sur la classe [{2}] n''est pas valide
elProcessor.defineFunctionNoMethod=Une méthode statique et publique [{0}] n''a pas pu être trouvée sur la classe [{1}]
elProcessor.defineFunctionNullParams=On ou plusieurs paramètres d'entrée sont null
expressionFactory.cannotCreate=Impossible de créer une ExpressionFactory de type [{0}]
expressionFactory.cannotFind=Impossible de trouver une ExpressionFactory de type [{0}]
expressionFactory.readFailed=Impossible de lire [{0}]
importHandler.ambiguousImport=La classe [{0}] n''a pas pu être importée car elle entre en conflit avec [{1}] qui a déjà été importée
importHandler.ambiguousStaticImport=L''import statique [{0}] ne peut pas être traité parce qu''il est en conflit avec [{1}] qui a déjà été importé
importHandler.classNotFound=La classe [{0}] n''a pu être importée, vu qu''on ne l''a pas trouvée
importHandler.invalidClass=La classe [{0}] doit être publique, non abstraite, ne pas être une interface et (pour Java 9+) être dans un package exporté
importHandler.invalidClassName=Le nom de la classe à importer [{0}] doit comprendre un paquet
importHandler.invalidClassNameForStatic=La classe [{0}] spécifiée pour l''import statique [{1}] n''est pas valide
importHandler.invalidStaticName=Le nom de la méthode statique ou champ à importer [{0}] doit inclure une calsse
importHandler.staticNotFound=L''importation statique [{0}] n''a pas été trouvée dans la classe [{1}] pour [{2}]
lambdaExpression.tooFewArgs=Seuls [{0}] arguments ont été fournis pour une expression lambda qui en demande au moins [{1}]
objectNotAssignable=Impossible d''ajouter un objet du type [{0}] à un tableau d''objets de type [{1}]
propertyNotFound=La propriété [{1}] n''a pas été trouvée sur le type [{0}]
propertyNotReadable=La propriété [{1}] n''est pas lisible sur le type [{0}]
propertyNotWritable=La propriété [{1}] ne peut pas être écrite pour le type [{0}]
propertyReadError=Erreur lors de la lecture de [{1}] sur le type [{0}]
propertyWriteError=Erreur d''écriture [{1}] sur le type [{0}]
staticFieldELResolver.methodNotFound=Aucune méthode publique et statique nommée [{0}] n''a été trouvée dans la classe [{1}]
staticFieldELResolver.notFound=Aucun champ public statique nommé [{0}] n''a été trouvé dans la classe [{1}] (exportée pour Java 9+)
staticFieldELResolver.notWriteable=L''écriture dans les champs statiques (champ [{0}] dans la classe [{1}] dans le cas présent) est interdite
util.method.ambiguous=Impossible de trouver une méthode non ambiguë : {0}.{1}({2})
util.method.notfound=Méthode non trouvée : {0}.{1}({2})
# 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.
beanNameELResolver.beanReadOnly=Bean名[{0}]は読み取り専用です
elProcessor.defineFunctionInvalidClass=クラス [{0}] はpublicではありません。
elProcessor.defineFunctionInvalidMethod=クラス [{1}] のメソッド [{0}] は public static メソッドではありません。
elProcessor.defineFunctionInvalidParameterList=クラス [{2}] のメソッド [{1}] に不正なパラメーターリスト [{0}] が指定されました。
elProcessor.defineFunctionInvalidParameterTypeName=クラス[{2}]のメソッド[{1}]のパラメータタイプ[{0}]が無効です
elProcessor.defineFunctionNoMethod=クラス[{1}]のpublic staticメソッド[{0}]が見つかりませんでした。
elProcessor.defineFunctionNullParams=1つ以上の入力パラメータがnullでした。
expressionFactory.cannotCreate=型[{0}]のExpressionFactoryを作成できません。
expressionFactory.cannotFind=[{0}]型のExpressionFactoryを見つけることができません。
expressionFactory.readFailed=[{0}]の読み取りに失敗しました
importHandler.ambiguousImport=クラス [{0}] はすでにインポートした [{1}] と衝突するためインポートできません。
importHandler.ambiguousStaticImport=static import [{0}] はすでにインポートした [{1}] と衝突するため処理できません。
importHandler.classNotFound=存在しないクラス [{0}] はインポートできません。
importHandler.invalidClass=クラス[{0}]は、パブリックで非abstract であり、インタフェースではない。
importHandler.invalidClassName=インポートするクラスの名前[{0}]にはパッケージが含まれている必要があります
importHandler.invalidClassNameForStatic=クラス [{0}] の static import [{1}] は不正です。
importHandler.invalidStaticName=インポートするstaticメソッドまたはフィールドの名前[{0}]にはクラスが含まれている必要があります。
importHandler.staticNotFound=インポート[{2}]の静的インポート[{0}]はクラス[{1}]で見つかりませんでした
lambdaExpression.tooFewArgs=少なくとも[{1}]を必要とするラムダ式に対しては、[{0}]引数のみが提供されました。
objectNotAssignable=クラス [{0}] のオブジェクトはクラス [{1}] のオブジェクト配列へ追加できません。
propertyNotFound=プロパティ[{1}]がタイプ[{0}]で見つかりません
propertyNotReadable=タイプ[{0}]でプロパティ[{1}]を読み込めません。
propertyNotWritable=プロパティ[{1}]はタイプ[{0}]に書き込み可能ではありません
propertyReadError=タイプ[{0}]の[{1}]の読み取りエラー
propertyWriteError=タイプ[{0}]の[{1}]への書き込みエラー
staticFieldELResolver.methodNotFound=クラス[{1}]に[{0}]という名前に一致するpublic staticメソッドが見つかりません。
staticFieldELResolver.notFound=クラス[{1}]に[{0}]という名前のpublic staticフィールドが見つかりませんでした。
staticFieldELResolver.notWriteable=静的フィールド(この場合、クラス[{1}]のフィールド[{0})への書き込みは許可されていません。
util.method.ambiguous=曖昧さのないメソッドを見つけることができません:{0}。{1}({2})
util.method.notfound=メソッドが見つかりません:{0}。{1}({2})
# 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.
beanNameELResolver.beanReadOnly=Bean 이름 [{0}]은(는) 읽기 전용입니다.
elProcessor.defineFunctionInvalidClass=클래스 [{0}]은(는) public 클래스가 아닙니다.
elProcessor.defineFunctionInvalidMethod=클래스 [{1}]의 메소드 [{0}]은(는) public static 메소드가 아닙니다.
elProcessor.defineFunctionInvalidParameterList=클래스 [{2}]의 메소드 [{1}]을(를) 위한 파라미터 목록 [{0}]이(가) 유효하지 않습니다.
elProcessor.defineFunctionInvalidParameterTypeName=클래스 [{2}]의 메소드 [{1}]을(를) 위한 파라미터 타입 [{0}]은(는) 유효하지 않습니다.
elProcessor.defineFunctionNoMethod=클래스 [{1}]에서 public static 메소드 [{0}]을(를) 찾을 수 없었습니다.
elProcessor.defineFunctionNullParams=하나 이상의 입력 파라미터들이 널이었습니다.
expressionFactory.cannotCreate=타입 [{0}]의 ExpressionFactory를 생성할 수 없습니다.
expressionFactory.cannotFind=타입 [{0}]의 ExpressionFactory를 찾을 수 없습니다.
expressionFactory.readFailed=[{0}]을(를) 읽지 못했습니다.
importHandler.ambiguousImport=이미 임포트된 [{1}]와(과) 충돌하기에, 클래스 [{0}]은(는) 임포트될 수 없었습니다.
importHandler.ambiguousStaticImport=정적 임포트 [{0}]은(는), 이미 임포트된 [{1}]와(과) 충돌하기 때문에 처리될 수 없었습니다.
importHandler.classNotFound=클래스 [{0}]을(를) 찾을 수 없어서 임포트될 수 없습니다.
importHandler.invalidClass=클래스 [{0}]은(는), 반드시 public이어야 하고 abstract가 아니어야 하며 인터페이스가 아니어야 합니다.
importHandler.invalidClassName=임포트할 클래스 이름 [{0}]은(는) 반드시 패키지를 포함해야 합니다.
importHandler.invalidClassNameForStatic=정적 임포트 [{1}]을(를) 위해 지정된 클래스 [{0}]은(는) 유효하지 않습니다.
importHandler.invalidStaticName=임포트할 정적 메소드나 필드의 이름은, 반드시 클래스를 포함해야 합니다: [{0}]
importHandler.staticNotFound=임포트 [{2}]을(를) 위한 클래스 [{1}] 내에서, 정적 임포트 [{0}]을(를) 찾을 수 없습니다.
lambdaExpression.tooFewArgs=적어도 [{1}]개의 아규먼트들을 요구하는 람다 표현식에, 단지 [{0}]개의 아규먼트들만이 제공되었습니다.
objectNotAssignable=타입 [{0}]의 객체를, 타입 [{1}]의 객체 배열에 추가할 수 없습니다.
propertyNotFound=타입 [{0}]에서 프로퍼티 [{1}]을(를) 찾을 수 없습니다.
propertyNotReadable=타입 [{0}]에서 프로퍼티 [{1}]을(를) 읽을 수 없습니다.
propertyNotWritable=타입 [{0}]에서 쓰기 가능하지 않은 프로퍼티 [{1}]
propertyReadError=타입 [{0}]에서 [{1}]을(를) 읽는 중 오류 발생
propertyWriteError=타입 [{0}]에 [{1}]을(를) 쓰는 중 오류 발생
staticFieldELResolver.methodNotFound=클래스 [{1}]에 [{0}](이)라는 이름의 public static 메소드가 발견되지 않습니다.
staticFieldELResolver.notFound=클래스 [{1}]에, [{0}](이)라는 이름의 public static 필드가 없습니다.
staticFieldELResolver.notWriteable=정적 필드들에 대해 쓰기는 허용되지 않습니다 (이번 경우는 클래스 [{1}]의 필드 [{0}]).
util.method.ambiguous=애매하지 않고 명백하게 메소드를 찾을 수 없습니다: {0}.{1}({2})
util.method.notfound=메소드를 찾을 수 없습니다: {0}.{1}({2})
# 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.
beanNameELResolver.beanReadOnly=O nome do bean [{0}] é apenas para leitura
elProcessor.defineFunctionInvalidClass=A classe [{0}] não possui visibilidade pública
elProcessor.defineFunctionInvalidMethod=O método [{0}] da classe [{1}] não é um método público e estático
importHandler.invalidClassNameForStatic=A classe [{0}] especificada para o import estático [{1}] é inválida
# 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.
beanNameELResolver.beanReadOnly=名称为[{0}]的bean只读
elProcessor.defineFunctionInvalidClass=类[{0}]不是公共的
elProcessor.defineFunctionInvalidMethod=类[{1}]的方法[{0}]不是公共静态方法
elProcessor.defineFunctionInvalidParameterList=类[{2}]的方法[{1}]的参数列表[{0}]无效
elProcessor.defineFunctionInvalidParameterTypeName=类[{2}]的方法[{1}]的参数类型[{0}]无效
elProcessor.defineFunctionNoMethod=无法找到类[{1}]的公共静态方法[{0}]
elProcessor.defineFunctionNullParams=一个或多个输入参数为null
expressionFactory.cannotCreate=无法创建类型为[{0}]的表达式工厂
expressionFactory.readFailed=无法读取[{0}]
importHandler.ambiguousImport=无法导入类[{0}],因为它与已导入的[{1}]冲突
importHandler.ambiguousStaticImport=无法处理静态导入[{0}],因为它与已导入的[{1}]冲突
importHandler.classNotFound=无法导入类[{0}],因为无法找到它
importHandler.invalidClass=类[{0}]必须是公共的、非抽象的、非接口且(对于Java 9+)在一个导出包
importHandler.invalidClassNameForStatic=为 static import [{1}] 指定的类 [{0}] 不可用
importHandler.invalidStaticName=导入 [{0}] 的静态方法或字段名称必须包含类
importHandler.staticNotFound=导入[{2}]的类[{1}]中找不到静态导入[{0}]
lambdaExpression.tooFewArgs=仅为至少需要[{1}]个参数的lambda表达式提供了[{0}]个参数
objectNotAssignable=无法将类型为[{0}]的对象添加到[{1}]类型的对象数组中
propertyNotFound=类型[{0}]上找不到属性[{1}]
propertyNotReadable=属性[{1}]在类型[{0}]上不可读
propertyNotWritable=属性[{1}]在类型[{0}]上不可写
propertyReadError=在类型[{0}]上读取[{1}]时出错
propertyWriteError=在类型[{0}]上写入[{1}]时出错
staticFieldELResolver.methodNotFound=在类[{1}]上找不到名为[{0}]的匹配的公共静态方法
staticFieldELResolver.notFound=(Java 9+导出)类[{1}]上找不到名为[{0}]的公共静态字段
staticFieldELResolver.notWriteable=不允许写入静态字段(当前情况中为类[{1}]上的字段[{0}])
util.method.ambiguous=无法找到明确的方法:{0}.{1}({2})
util.method.notfound=找不到方法:{0}.{1}({2})
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public class MapELResolver extends ELResolver {
private static final Class<?> UNMODIFIABLE =
Collections.unmodifiableMap(new HashMap<>()).getClass();
private final boolean readOnly;
public MapELResolver() {
this.readOnly = false;
}
public MapELResolver(boolean readOnly) {
this.readOnly = readOnly;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof Map<?,?>) {
context.setPropertyResolved(base, property);
return Object.class;
}
return null;
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof Map<?,?>) {
context.setPropertyResolved(base, property);
return ((Map<?,?>) base).get(property);
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base instanceof Map<?, ?>) {
context.setPropertyResolved(base, property);
if (this.readOnly) {
throw new PropertyNotWritableException(Util.message(context,
"resolverNotWriteable", base.getClass().getName()));
}
try {
@SuppressWarnings("unchecked") // Must be OK
Map<Object, Object> map = ((Map<Object, Object>) base);
map.put(property, value);
} catch (UnsupportedOperationException e) {
throw new PropertyNotWritableException(e);
}
}
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof Map<?, ?>) {
context.setPropertyResolved(base, property);
return this.readOnly || UNMODIFIABLE.equals(base.getClass());
}
return this.readOnly;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
if (base instanceof Map<?, ?>) {
Iterator<?> itr = ((Map<?, ?>) base).keySet().iterator();
List<FeatureDescriptor> feats = new ArrayList<>();
Object key;
FeatureDescriptor desc;
while (itr.hasNext()) {
key = itr.next();
desc = new FeatureDescriptor();
desc.setDisplayName(key.toString());
desc.setShortDescription("");
desc.setExpert(false);
desc.setHidden(false);
desc.setName(key.toString());
desc.setPreferred(true);
desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
desc.setValue(TYPE, key.getClass());
feats.add(desc);
}
return feats.iterator();
}
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base instanceof Map<?, ?>) {
return Object.class;
}
return null;
}
}
/*
* 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.
*/
package jakarta.el;
public abstract class MethodExpression extends Expression {
private static final long serialVersionUID = 8163925562047324656L;
/**
* @param context The EL context for this evaluation
*
* @return Information about the method that this expression resolves to
*
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If a property/variable resolution failed because no match
* was found or a match was found but was not readable
* @throws MethodNotFoundException
* If no matching method can be found
* @throws ELException
* Wraps any exception throw whilst resolving the property
*/
public abstract MethodInfo getMethodInfo(ELContext context);
/**
* @param context The EL context for this evaluation
* @param params The parameters with which to invoke this method expression
*
* @return The result of invoking this method expression
*
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If a property/variable resolution failed because no match
* was found or a match was found but was not readable
* @throws MethodNotFoundException
* If no matching method can be found
* @throws ELException
* Wraps any exception throw whilst resolving the property or
* coercion of the result to the expected return type fails
*/
public abstract Object invoke(ELContext context, Object[] params);
/**
* @return This default implementation always returns <code>false</code>
* @since EL 3.0
*/
public boolean isParametersProvided() {
// Expected to be over-ridden by implementation
return false;
}
/**
* @since EL 2.2
*
* Note: The spelling mistake is deliberate.
* isParmetersProvided() - Specification definition
* isParametersProvided() - Corrected spelling
*
* @return Always <code>false</code>
*
* @deprecated Use {@link #isParametersProvided()}
*/
@Deprecated
public boolean isParmetersProvided() {
// Expected to be over-ridden by implementation
return false;
}
}
/*
* 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.
*/
package jakarta.el;
public class MethodInfo {
private final String name;
private final Class<?>[] paramTypes;
private final Class<?> returnType;
public MethodInfo(String name, Class<?> returnType, Class<?>[] paramTypes) {
this.name = name;
this.returnType = returnType;
this.paramTypes = paramTypes;
}
public String getName() {
return this.name;
}
public Class<?> getReturnType() {
return this.returnType;
}
public Class<?>[] getParamTypes() {
return this.paramTypes;
}
}
/*
* 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.
*/
package jakarta.el;
public class MethodNotFoundException extends ELException {
private static final long serialVersionUID = -3631968116081480328L;
public MethodNotFoundException() {
super();
}
public MethodNotFoundException(String message) {
super(message);
}
public MethodNotFoundException(Throwable cause) {
super(cause);
}
public MethodNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}
/*
* 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.
*/
package jakarta.el;
public class PropertyNotFoundException extends ELException {
private static final long serialVersionUID = -3799200961303506745L;
public PropertyNotFoundException() {
super();
}
public PropertyNotFoundException(String message) {
super(message);
}
public PropertyNotFoundException(Throwable cause) {
super(cause);
}
public PropertyNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}
/*
* 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.
*/
package jakarta.el;
public class PropertyNotWritableException extends ELException {
private static final long serialVersionUID = 827987155471214717L;
public PropertyNotWritableException() {
super();
}
public PropertyNotWritableException(String message) {
super(message);
}
public PropertyNotWritableException(Throwable cause) {
super(cause);
}
public PropertyNotWritableException(String message, Throwable cause) {
super(message, cause);
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.MissingResourceException;
import java.util.Objects;
import java.util.ResourceBundle;
public class ResourceBundleELResolver extends ELResolver {
public ResourceBundleELResolver() {
super();
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ResourceBundle) {
context.setPropertyResolved(base, property);
if (property != null) {
try {
return ((ResourceBundle) base).getObject(property
.toString());
} catch (MissingResourceException mre) {
return "???" + property.toString() + "???";
}
}
}
return null;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ResourceBundle) {
context.setPropertyResolved(base, property);
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base instanceof ResourceBundle) {
context.setPropertyResolved(base, property);
throw new PropertyNotWritableException(Util.message(context,
"resolverNotWriteable", base.getClass().getName()));
}
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ResourceBundle) {
context.setPropertyResolved(base, property);
return true;
}
return false;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(
ELContext context, Object base) {
if (base instanceof ResourceBundle) {
List<FeatureDescriptor> feats = new ArrayList<>();
Enumeration<String> e = ((ResourceBundle) base).getKeys();
FeatureDescriptor feat;
String key;
while (e.hasMoreElements()) {
key = e.nextElement();
feat = new FeatureDescriptor();
feat.setDisplayName(key);
feat.setShortDescription("");
feat.setExpert(false);
feat.setHidden(false);
feat.setName(key);
feat.setPreferred(true);
feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
feat.setValue(TYPE, String.class);
feats.add(feat);
}
return feats.iterator();
}
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base instanceof ResourceBundle) {
return String.class;
}
return null;
}
}
/*
* 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.
*/
package jakarta.el;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
/**
* @since EL 3.0
*/
public class StandardELContext extends ELContext {
private final ELContext wrappedContext;
private final VariableMapper variableMapper;
private final FunctionMapper functionMapper;
private final CompositeELResolver standardResolver;
private final CompositeELResolver customResolvers;
private final Map<String,Object> localBeans = new HashMap<>();
public StandardELContext(ExpressionFactory factory) {
wrappedContext = null;
variableMapper = new StandardVariableMapper();
functionMapper =
new StandardFunctionMapper(factory.getInitFunctionMap());
standardResolver = new CompositeELResolver();
customResolvers = new CompositeELResolver();
ELResolver streamResolver = factory.getStreamELResolver();
// Add resolvers in order
standardResolver.add(new BeanNameELResolver(
new StandardBeanNameResolver(localBeans)));
standardResolver.add(customResolvers);
if (streamResolver != null) {
standardResolver.add(streamResolver);
}
standardResolver.add(new StaticFieldELResolver());
standardResolver.add(new MapELResolver());
standardResolver.add(new ResourceBundleELResolver());
standardResolver.add(new ListELResolver());
standardResolver.add(new ArrayELResolver());
standardResolver.add(new BeanELResolver());
}
public StandardELContext(ELContext context) {
wrappedContext = context;
variableMapper = context.getVariableMapper();
functionMapper = context.getFunctionMapper();
standardResolver = new CompositeELResolver();
customResolvers = new CompositeELResolver();
// Add resolvers in order
standardResolver.add(new BeanNameELResolver(
new StandardBeanNameResolver(localBeans)));
standardResolver.add(customResolvers);
// Use resolvers from context from this point on
standardResolver.add(context.getELResolver());
}
@Override
public void putContext(Class<?> key, Object contextObject) {
if (wrappedContext == null) {
super.putContext(key, contextObject);
} else {
wrappedContext.putContext(key, contextObject);
}
}
@Override
public Object getContext(Class<?> key) {
if (wrappedContext == null) {
return super.getContext(key);
} else {
return wrappedContext.getContext(key);
}
}
@Override
public ELResolver getELResolver() {
return standardResolver;
}
public void addELResolver(ELResolver resolver) {
customResolvers.add(resolver);
}
@Override
public FunctionMapper getFunctionMapper() {
return functionMapper;
}
@Override
public VariableMapper getVariableMapper() {
return variableMapper;
}
Map<String,Object> getLocalBeans() {
return localBeans;
}
private static class StandardVariableMapper extends VariableMapper {
private Map<String, ValueExpression> vars;
@Override
public ValueExpression resolveVariable(String variable) {
if (vars == null) {
return null;
}
return vars.get(variable);
}
@Override
public ValueExpression setVariable(String variable,
ValueExpression expression) {
if (vars == null)
vars = new HashMap<>();
if (expression == null) {
return vars.remove(variable);
} else {
return vars.put(variable, expression);
}
}
}
private static class StandardBeanNameResolver extends BeanNameResolver {
private final Map<String,Object> beans;
public StandardBeanNameResolver(Map<String,Object> beans) {
this.beans = beans;
}
@Override
public boolean isNameResolved(String beanName) {
return beans.containsKey(beanName);
}
@Override
public Object getBean(String beanName) {
return beans.get(beanName);
}
@Override
public void setBeanValue(String beanName, Object value)
throws PropertyNotWritableException {
beans.put(beanName, value);
}
@Override
public boolean isReadOnly(String beanName) {
return false;
}
@Override
public boolean canCreateBean(String beanName) {
return true;
}
}
private static class StandardFunctionMapper extends FunctionMapper {
private final Map<String,Method> methods = new HashMap<>();
public StandardFunctionMapper(Map<String,Method> initFunctionMap) {
if (initFunctionMap != null) {
methods.putAll(initFunctionMap);
}
}
@Override
public Method resolveFunction(String prefix, String localName) {
String key = prefix + ':' + localName;
return methods.get(key);
}
@Override
public void mapFunction(String prefix, String localName,
Method method) {
String key = prefix + ':' + localName;
if (method == null) {
methods.remove(key);
} else {
methods.put(key, method);
}
}
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Iterator;
import java.util.Objects;
/**
* @since EL 3.0
*/
public class StaticFieldELResolver extends ELResolver {
@Override
public Object getValue(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ELClass && property instanceof String) {
context.setPropertyResolved(base, property);
Class<?> clazz = ((ELClass) base).getKlass();
String name = (String) property;
Exception exception = null;
try {
Field field = clazz.getField(name);
int modifiers = field.getModifiers();
JreCompat jreCompat = JreCompat.getInstance();
if (Modifier.isStatic(modifiers) &&
Modifier.isPublic(modifiers) &&
jreCompat.canAcccess(null, field)) {
return field.get(null);
}
} catch (IllegalArgumentException | IllegalAccessException |
NoSuchFieldException | SecurityException e) {
exception = e;
}
String msg = Util.message(context, "staticFieldELResolver.notFound",
name, clazz.getName());
if (exception == null) {
throw new PropertyNotFoundException(msg);
} else {
throw new PropertyNotFoundException(msg, exception);
}
}
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
Objects.requireNonNull(context);
if (base instanceof ELClass && property instanceof String) {
Class<?> clazz = ((ELClass) base).getKlass();
String name = (String) property;
throw new PropertyNotWritableException(Util.message(context,
"staticFieldELResolver.notWriteable", name,
clazz.getName()));
}
}
@Override
public Object invoke(ELContext context, Object base, Object method,
Class<?>[] paramTypes, Object[] params) {
Objects.requireNonNull(context);
if (base instanceof ELClass && method instanceof String) {
context.setPropertyResolved(base, method);
Class<?> clazz = ((ELClass) base).getKlass();
String methodName = (String) method;
if ("<init>".equals(methodName)) {
Constructor<?> match =
Util.findConstructor(clazz, paramTypes, params);
Object[] parameters = Util.buildParameters(
match.getParameterTypes(), match.isVarArgs(), params);
Object result = null;
try {
result = match.newInstance(parameters);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(cause);
} catch (ReflectiveOperationException e) {
throw new ELException(e);
}
return result;
} else {
// Static method so base should be null
Method match = Util.findMethod(clazz, null, methodName, paramTypes, params);
// Note: On Java 9 and above, the isStatic check becomes
// unnecessary because the canAccess() call in Util.findMethod()
// effectively performs the same check
if (match == null || !Modifier.isStatic(match.getModifiers())) {
throw new MethodNotFoundException(Util.message(context,
"staticFieldELResolver.methodNotFound", methodName,
clazz.getName()));
}
Object[] parameters = Util.buildParameters(
match.getParameterTypes(), match.isVarArgs(), params);
Object result = null;
try {
result = match.invoke(null, parameters);
} catch (IllegalArgumentException | IllegalAccessException e) {
throw new ELException(e);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(cause);
}
return result;
}
}
return null;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ELClass && property instanceof String) {
context.setPropertyResolved(base, property);
Class<?> clazz = ((ELClass) base).getKlass();
String name = (String) property;
Exception exception = null;
try {
Field field = clazz.getField(name);
int modifiers = field.getModifiers();
JreCompat jreCompat = JreCompat.getInstance();
if (Modifier.isStatic(modifiers) &&
Modifier.isPublic(modifiers) &&
jreCompat.canAcccess(null, field)) {
return field.getType();
}
} catch (IllegalArgumentException | NoSuchFieldException |
SecurityException e) {
exception = e;
}
String msg = Util.message(context, "staticFieldELResolver.notFound",
name, clazz.getName());
if (exception == null) {
throw new PropertyNotFoundException(msg);
} else {
throw new PropertyNotFoundException(msg, exception);
}
}
return null;
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ELClass && property instanceof String) {
context.setPropertyResolved(base, property);
}
return true;
}
/**
* Always returns <code>null</code>.
*/
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
Object base) {
return null;
}
/**
* Always returns <code>String.class</code>.
*/
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return String.class;
}
}
/*
* 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.
*/
package jakarta.el;
import java.beans.FeatureDescriptor;
import java.util.Iterator;
/**
* @since EL 3.0
*/
public abstract class TypeConverter extends ELResolver {
@Override
public Object getValue(ELContext context, Object base, Object property) {
return null;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
return null;
}
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) {
// NO-OP
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return false;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
Object base) {
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return null;
}
@Override
public abstract Object convertToType(ELContext context, Object obj,
Class<?> type);
}
/*
* 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.
*/
package jakarta.el;
import java.lang.ref.WeakReference;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
class Util {
private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
/**
* Checks whether the supplied Throwable is one that needs to be
* rethrown and swallows all others.
* @param t the Throwable to check
*/
static void handleThrowable(Throwable t) {
if (t instanceof ThreadDeath) {
throw (ThreadDeath) t;
}
if (t instanceof VirtualMachineError) {
throw (VirtualMachineError) t;
}
// All other instances of Throwable will be silently swallowed
}
static String message(ELContext context, String name, Object... props) {
Locale locale = null;
if (context != null) {
locale = context.getLocale();
}
if (locale == null) {
locale = Locale.getDefault();
if (locale == null) {
return "";
}
}
ResourceBundle bundle = ResourceBundle.getBundle(
"jakarta.el.LocalStrings", locale);
try {
String template = bundle.getString(name);
if (props != null) {
template = MessageFormat.format(template, props);
}
return template;
} catch (MissingResourceException e) {
return "Missing Resource: '" + name + "' for Locale " + locale.getDisplayName();
}
}
private static final CacheValue nullTcclFactory = new CacheValue();
private static final Map<CacheKey, CacheValue> factoryCache = new ConcurrentHashMap<>();
/**
* Provides a per class loader cache of ExpressionFactory instances without
* pinning any in memory as that could trigger a memory leak.
*/
static ExpressionFactory getExpressionFactory() {
ClassLoader tccl = getContextClassLoader();
CacheValue cacheValue = null;
ExpressionFactory factory = null;
if (tccl == null) {
cacheValue = nullTcclFactory;
} else {
CacheKey key = new CacheKey(tccl);
cacheValue = factoryCache.get(key);
if (cacheValue == null) {
CacheValue newCacheValue = new CacheValue();
cacheValue = factoryCache.putIfAbsent(key, newCacheValue);
if (cacheValue == null) {
cacheValue = newCacheValue;
}
}
}
final Lock readLock = cacheValue.getLock().readLock();
readLock.lock();
try {
factory = cacheValue.getExpressionFactory();
} finally {
readLock.unlock();
}
if (factory == null) {
final Lock writeLock = cacheValue.getLock().writeLock();
writeLock.lock();
try {
factory = cacheValue.getExpressionFactory();
if (factory == null) {
factory = ExpressionFactory.newInstance();
cacheValue.setExpressionFactory(factory);
}
} finally {
writeLock.unlock();
}
}
return factory;
}
/**
* Key used to cache default ExpressionFactory information per class
* loader. The class loader reference is never {@code null}, because
* {@code null} tccl is handled separately.
*/
private static class CacheKey {
private final int hash;
private final WeakReference<ClassLoader> ref;
public CacheKey(ClassLoader key) {
hash = key.hashCode();
ref = new WeakReference<>(key);
}
@Override
public int hashCode() {
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CacheKey)) {
return false;
}
ClassLoader thisKey = ref.get();
if (thisKey == null) {
return false;
}
return thisKey == ((CacheKey) obj).ref.get();
}
}
private static class CacheValue {
private final ReadWriteLock lock = new ReentrantReadWriteLock();
private WeakReference<ExpressionFactory> ref;
public CacheValue() {
}
public ReadWriteLock getLock() {
return lock;
}
public ExpressionFactory getExpressionFactory() {
return ref != null ? ref.get() : null;
}
public void setExpressionFactory(ExpressionFactory factory) {
ref = new WeakReference<>(factory);
}
}
/*
* This method duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
static Method findMethod(Class<?> clazz, Object base, String methodName,
Class<?>[] paramTypes, Object[] paramValues) {
if (clazz == null || methodName == null) {
throw new MethodNotFoundException(
message(null, "util.method.notfound", clazz, methodName,
paramString(paramTypes)));
}
if (paramTypes == null) {
paramTypes = getTypesFromValues(paramValues);
}
Method[] methods = clazz.getMethods();
List<Wrapper<Method>> wrappers = Wrapper.wrap(methods, methodName);
Wrapper<Method> result = findWrapper(clazz, wrappers, methodName, paramTypes, paramValues);
return getMethod(clazz, base, result.unWrap());
}
/*
* This method duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
@SuppressWarnings("null")
private static <T> Wrapper<T> findWrapper(Class<?> clazz, List<Wrapper<T>> wrappers,
String name, Class<?>[] paramTypes, Object[] paramValues) {
Map<Wrapper<T>,MatchResult> candidates = new HashMap<>();
int paramCount = paramTypes.length;
for (Wrapper<T> w : wrappers) {
Class<?>[] mParamTypes = w.getParameterTypes();
int mParamCount;
if (mParamTypes == null) {
mParamCount = 0;
} else {
mParamCount = mParamTypes.length;
}
// Check the number of parameters
// Multiple tests to improve readability
if (!w.isVarArgs() && paramCount != mParamCount) {
// Method has wrong number of parameters
continue;
}
if (w.isVarArgs() && paramCount < mParamCount -1) {
// Method has wrong number of parameters
continue;
}
if (w.isVarArgs() && paramCount == mParamCount && paramValues != null &&
paramValues.length > paramCount && !paramTypes[mParamCount -1].isArray()) {
// Method arguments don't match
continue;
}
if (w.isVarArgs() && paramCount > mParamCount && paramValues != null &&
paramValues.length != paramCount) {
// Might match a different varargs method
continue;
}
if (!w.isVarArgs() && paramValues != null && paramCount != paramValues.length) {
// Might match a different varargs method
continue;
}
// Check the parameters match
int exactMatch = 0;
int assignableMatch = 0;
int coercibleMatch = 0;
boolean noMatch = false;
for (int i = 0; i < mParamCount; i++) {
// Can't be null
if (w.isVarArgs() && i == (mParamCount - 1)) {
if (i == paramCount || (paramValues != null && paramValues.length == i)) {
// Nothing is passed as varargs
assignableMatch++;
break;
}
Class<?> varType = mParamTypes[i].getComponentType();
for (int j = i; j < paramCount; j++) {
if (isAssignableFrom(paramTypes[j], varType)) {
assignableMatch++;
} else {
if (paramValues == null) {
noMatch = true;
break;
} else {
if (isCoercibleFrom(paramValues[j], varType)) {
coercibleMatch++;
} else {
noMatch = true;
break;
}
}
}
// Don't treat a varArgs match as an exact match, it can
// lead to a varArgs method matching when the result
// should be ambiguous
}
} else {
if (mParamTypes[i].equals(paramTypes[i])) {
exactMatch++;
} else if (paramTypes[i] != null && isAssignableFrom(paramTypes[i], mParamTypes[i])) {
assignableMatch++;
} else {
if (paramValues == null) {
noMatch = true;
break;
} else {
if (isCoercibleFrom(paramValues[i], mParamTypes[i])) {
coercibleMatch++;
} else {
noMatch = true;
break;
}
}
}
}
}
if (noMatch) {
continue;
}
// If a method is found where every parameter matches exactly,
// return it
if (exactMatch == paramCount) {
return w;
}
candidates.put(w, new MatchResult(
exactMatch, assignableMatch, coercibleMatch, w.isBridge()));
}
// Look for the method that has the highest number of parameters where
// the type matches exactly
MatchResult bestMatch = new MatchResult(0, 0, 0, false);
Wrapper<T> match = null;
boolean multiple = false;
for (Map.Entry<Wrapper<T>, MatchResult> entry : candidates.entrySet()) {
int cmp = entry.getValue().compareTo(bestMatch);
if (cmp > 0 || match == null) {
bestMatch = entry.getValue();
match = entry.getKey();
multiple = false;
} else if (cmp == 0) {
multiple = true;
}
}
if (multiple) {
if (bestMatch.getExact() == paramCount - 1) {
// Only one parameter is not an exact match - try using the
// super class
match = resolveAmbiguousWrapper(candidates.keySet(), paramTypes);
} else {
match = null;
}
if (match == null) {
// If multiple methods have the same matching number of parameters
// the match is ambiguous so throw an exception
throw new MethodNotFoundException(message(
null, "util.method.ambiguous", clazz, name,
paramString(paramTypes)));
}
}
// Handle case where no match at all was found
if (match == null) {
throw new MethodNotFoundException(message(
null, "util.method.notfound", clazz, name,
paramString(paramTypes)));
}
return match;
}
private static final String paramString(Class<?>[] types) {
if (types != null) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < types.length; i++) {
if (types[i] == null) {
sb.append("null, ");
} else {
sb.append(types[i].getName()).append(", ");
}
}
if (sb.length() > 2) {
sb.setLength(sb.length() - 2);
}
return sb.toString();
}
return null;
}
/*
* This method duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
private static <T> Wrapper<T> resolveAmbiguousWrapper(Set<Wrapper<T>> candidates,
Class<?>[] paramTypes) {
// Identify which parameter isn't an exact match
Wrapper<T> w = candidates.iterator().next();
int nonMatchIndex = 0;
Class<?> nonMatchClass = null;
for (int i = 0; i < paramTypes.length; i++) {
if (w.getParameterTypes()[i] != paramTypes[i]) {
nonMatchIndex = i;
nonMatchClass = paramTypes[i];
break;
}
}
if (nonMatchClass == null) {
// Null will always be ambiguous
return null;
}
for (Wrapper<T> c : candidates) {
if (c.getParameterTypes()[nonMatchIndex] ==
paramTypes[nonMatchIndex]) {
// Methods have different non-matching parameters
// Result is ambiguous
return null;
}
}
// Can't be null
Class<?> superClass = nonMatchClass.getSuperclass();
while (superClass != null) {
for (Wrapper<T> c : candidates) {
if (c.getParameterTypes()[nonMatchIndex].equals(superClass)) {
// Found a match
return c;
}
}
superClass = superClass.getSuperclass();
}
// Treat instances of Number as a special case
Wrapper<T> match = null;
if (Number.class.isAssignableFrom(nonMatchClass)) {
for (Wrapper<T> c : candidates) {
Class<?> candidateType = c.getParameterTypes()[nonMatchIndex];
if (Number.class.isAssignableFrom(candidateType) ||
candidateType.isPrimitive()) {
if (match == null) {
match = c;
} else {
// Match still ambiguous
match = null;
break;
}
}
}
}
return match;
}
/*
* This method duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
static boolean isAssignableFrom(Class<?> src, Class<?> target) {
// src will always be an object
// Short-cut. null is always assignable to an object and in EL null
// can always be coerced to a valid value for a primitive
if (src == null) {
return true;
}
Class<?> targetClass;
if (target.isPrimitive()) {
if (target == Boolean.TYPE) {
targetClass = Boolean.class;
} else if (target == Character.TYPE) {
targetClass = Character.class;
} else if (target == Byte.TYPE) {
targetClass = Byte.class;
} else if (target == Short.TYPE) {
targetClass = Short.class;
} else if (target == Integer.TYPE) {
targetClass = Integer.class;
} else if (target == Long.TYPE) {
targetClass = Long.class;
} else if (target == Float.TYPE) {
targetClass = Float.class;
} else {
targetClass = Double.class;
}
} else {
targetClass = target;
}
return targetClass.isAssignableFrom(src);
}
/*
* This method duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
private static boolean isCoercibleFrom(Object src, Class<?> target) {
// TODO: This isn't pretty but it works. Significant refactoring would
// be required to avoid the exception.
try {
getExpressionFactory().coerceToType(src, target);
} catch (ELException e) {
return false;
}
return true;
}
private static Class<?>[] getTypesFromValues(Object[] values) {
if (values == null) {
return EMPTY_CLASS_ARRAY;
}
Class<?> result[] = new Class<?>[values.length];
for (int i = 0; i < values.length; i++) {
if (values[i] == null) {
result[i] = null;
} else {
result[i] = values[i].getClass();
}
}
return result;
}
/*
* This method duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
static Method getMethod(Class<?> type, Object base, Method m) {
JreCompat jreCompat = JreCompat.getInstance();
// If base is null, method MUST be static
// If base is non-null, method may be static or non-static
if (m == null ||
(Modifier.isPublic(type.getModifiers()) &&
(jreCompat.canAcccess(base, m) || base != null && jreCompat.canAcccess(null, m)))) {
return m;
}
Class<?>[] inf = type.getInterfaces();
Method mp = null;
for (int i = 0; i < inf.length; i++) {
try {
mp = inf[i].getMethod(m.getName(), m.getParameterTypes());
mp = getMethod(mp.getDeclaringClass(), base, mp);
if (mp != null) {
return mp;
}
} catch (NoSuchMethodException e) {
// Ignore
}
}
Class<?> sup = type.getSuperclass();
if (sup != null) {
try {
mp = sup.getMethod(m.getName(), m.getParameterTypes());
mp = getMethod(mp.getDeclaringClass(), base, mp);
if (mp != null) {
return mp;
}
} catch (NoSuchMethodException e) {
// Ignore
}
}
return null;
}
static Constructor<?> findConstructor(Class<?> clazz, Class<?>[] paramTypes,
Object[] paramValues) {
String methodName = "<init>";
if (clazz == null) {
throw new MethodNotFoundException(
message(null, "util.method.notfound", null, methodName,
paramString(paramTypes)));
}
if (paramTypes == null) {
paramTypes = getTypesFromValues(paramValues);
}
Constructor<?>[] constructors = clazz.getConstructors();
List<Wrapper<Constructor<?>>> wrappers = Wrapper.wrap(constructors);
Wrapper<Constructor<?>> wrapper = findWrapper(clazz, wrappers, methodName, paramTypes, paramValues);
Constructor<?> constructor = wrapper.unWrap();
JreCompat jreCompat = JreCompat.getInstance();
if (!Modifier.isPublic(clazz.getModifiers()) || !jreCompat.canAcccess(null, constructor)) {
throw new MethodNotFoundException(message(
null, "util.method.notfound", clazz, methodName,
paramString(paramTypes)));
}
return constructor;
}
static Object[] buildParameters(Class<?>[] parameterTypes,
boolean isVarArgs,Object[] params) {
ExpressionFactory factory = getExpressionFactory();
Object[] parameters = null;
if (parameterTypes.length > 0) {
parameters = new Object[parameterTypes.length];
int paramCount;
if (params == null) {
params = EMPTY_OBJECT_ARRAY;
}
paramCount = params.length;
if (isVarArgs) {
int varArgIndex = parameterTypes.length - 1;
// First argCount-1 parameters are standard
for (int i = 0; (i < varArgIndex); i++) {
parameters[i] = factory.coerceToType(params[i],
parameterTypes[i]);
}
// Last parameter is the varargs
Class<?> varArgClass =
parameterTypes[varArgIndex].getComponentType();
final Object varargs = Array.newInstance(
varArgClass,
(paramCount - varArgIndex));
for (int i = (varArgIndex); i < paramCount; i++) {
Array.set(varargs, i - varArgIndex,
factory.coerceToType(params[i], varArgClass));
}
parameters[varArgIndex] = varargs;
} else {
parameters = new Object[parameterTypes.length];
for (int i = 0; i < parameterTypes.length; i++) {
parameters[i] = factory.coerceToType(params[i],
parameterTypes[i]);
}
}
}
return parameters;
}
static ClassLoader getContextClassLoader() {
ClassLoader tccl;
if (System.getSecurityManager() != null) {
PrivilegedAction<ClassLoader> pa = new PrivilegedGetTccl();
tccl = AccessController.doPrivileged(pa);
} else {
tccl = Thread.currentThread().getContextClassLoader();
}
return tccl;
}
private abstract static class Wrapper<T> {
public static List<Wrapper<Method>> wrap(Method[] methods, String name) {
List<Wrapper<Method>> result = new ArrayList<>();
for (Method method : methods) {
if (method.getName().equals(name)) {
result.add(new MethodWrapper(method));
}
}
return result;
}
public static List<Wrapper<Constructor<?>>> wrap(Constructor<?>[] constructors) {
List<Wrapper<Constructor<?>>> result = new ArrayList<>();
for (Constructor<?> constructor : constructors) {
result.add(new ConstructorWrapper(constructor));
}
return result;
}
public abstract T unWrap();
public abstract Class<?>[] getParameterTypes();
public abstract boolean isVarArgs();
public abstract boolean isBridge();
}
private static class MethodWrapper extends Wrapper<Method> {
private final Method m;
public MethodWrapper(Method m) {
this.m = m;
}
@Override
public Method unWrap() {
return m;
}
@Override
public Class<?>[] getParameterTypes() {
return m.getParameterTypes();
}
@Override
public boolean isVarArgs() {
return m.isVarArgs();
}
@Override
public boolean isBridge() {
return m.isBridge();
}
}
private static class ConstructorWrapper extends Wrapper<Constructor<?>> {
private final Constructor<?> c;
public ConstructorWrapper(Constructor<?> c) {
this.c = c;
}
@Override
public Constructor<?> unWrap() {
return c;
}
@Override
public Class<?>[] getParameterTypes() {
return c.getParameterTypes();
}
@Override
public boolean isVarArgs() {
return c.isVarArgs();
}
@Override
public boolean isBridge() {
return false;
}
}
/*
* This class duplicates code in org.apache.el.util.ReflectionUtil. When
* making changes keep the code in sync.
*/
private static class MatchResult implements Comparable<MatchResult> {
private final int exact;
private final int assignable;
private final int coercible;
private final boolean bridge;
public MatchResult(int exact, int assignable, int coercible, boolean bridge) {
this.exact = exact;
this.assignable = assignable;
this.coercible = coercible;
this.bridge = bridge;
}
public int getExact() {
return exact;
}
public int getAssignable() {
return assignable;
}
public int getCoercible() {
return coercible;
}
public boolean isBridge() {
return bridge;
}
@Override
public int compareTo(MatchResult o) {
int cmp = Integer.compare(this.getExact(), o.getExact());
if (cmp == 0) {
cmp = Integer.compare(this.getAssignable(), o.getAssignable());
if (cmp == 0) {
cmp = Integer.compare(this.getCoercible(), o.getCoercible());
if (cmp == 0) {
// The nature of bridge methods is such that it actually
// doesn't matter which one we pick as long as we pick
// one. That said, pick the 'right' one (the non-bridge
// one) anyway.
cmp = Boolean.compare(o.isBridge(), this.isBridge());
}
}
}
return cmp;
}
@Override
public boolean equals(Object o)
{
return o == this || (null != o &&
this.getClass().equals(o.getClass()) &&
((MatchResult)o).getExact() == this.getExact() &&
((MatchResult)o).getAssignable() == this.getAssignable() &&
((MatchResult)o).getCoercible() == this.getCoercible() &&
((MatchResult)o).isBridge() == this.isBridge());
}
@Override
public int hashCode()
{
return (this.isBridge() ? 1 << 24 : 0) ^
this.getExact() << 16 ^
this.getAssignable() << 8 ^
this.getCoercible();
}
}
private static class PrivilegedGetTccl implements PrivilegedAction<ClassLoader> {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
}
}
/*
* 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.
*/
package jakarta.el;
public abstract class ValueExpression extends Expression {
private static final long serialVersionUID = 8577809572381654673L;
/**
* @param context The EL context for this evaluation
*
* @return The result of evaluating this value expression
*
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If a property/variable resolution failed because no match
* was found or a match was found but was not readable
* @throws ELException
* Wraps any exception throw whilst resolving a property or
* variable
*/
public abstract Object getValue(ELContext context);
/**
* @param context The EL context for this evaluation
* @param value The value to set the property to which this value
* expression refers
*
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If a property/variable resolution failed because no match
* was found
* @throws PropertyNotWritableException
* If a property/variable resolution failed because a match was
* found but was not writable
* @throws ELException
* Wraps any exception throw whilst resolving a property or
* variable
*/
public abstract void setValue(ELContext context, Object value);
/**
* @param context The EL context for this evaluation
*
* @return <code>true</code> if this expression is read only otherwise
* <code>false</code>
*
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If a property/variable resolution failed because no match
* was found or a match was found but was not readable
* @throws ELException
* Wraps any exception throw whilst resolving a property or
* variable
*/
public abstract boolean isReadOnly(ELContext context);
/**
* @param context The EL context for this evaluation
*
* @return The type of the result of this value expression
*
* @throws NullPointerException
* If the supplied context is <code>null</code>
* @throws PropertyNotFoundException
* If a property/variable resolution failed because no match
* was found or a match was found but was not readable
* @throws ELException
* Wraps any exception throw whilst resolving a property or
* variable
*/
public abstract Class<?> getType(ELContext context);
public abstract Class<?> getExpectedType();
/**
* @param context The EL context for this evaluation
*
* @return This default implementation always returns <code>null</code>
*
* @since EL 2.2
*/
public ValueReference getValueReference(ELContext context) {
// Expected to be over-ridden by implementation
context.notifyBeforeEvaluation(getExpressionString());
context.notifyAfterEvaluation(getExpressionString());
return null;
}
}
/*
* 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.
*/
package jakarta.el;
import java.io.Serializable;
/**
* @since EL 2.2
*/
public class ValueReference implements Serializable {
private static final long serialVersionUID = 1L;
private final Object base;
private final Object property;
public ValueReference(Object base, Object property) {
this.base = base;
this.property = property;
}
public Object getBase() {
return base;
}
public Object getProperty() {
return property;
}
}
/*
* 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.
*/
package jakarta.el;
/**
*
*/
public abstract class VariableMapper {
public abstract ValueExpression resolveVariable(String variable);
public abstract ValueExpression setVariable(String variable, ValueExpression expression);
}
/*
* 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.
*/
package jakarta.mail;
public class Authenticator {
protected PasswordAuthentication getPasswordAuthentication() {
return null;
}
}
/*
* 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.
*/
package jakarta.mail.internet;
@SuppressWarnings("unused") // Dummy implementation
public class InternetAddress {
public InternetAddress(String from) {
// Dummy implementation
}
}
/*
* 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.
*/
package jakarta.mail.internet;
import jakarta.mail.Session;
@SuppressWarnings("unused") // Dummy implementation
public class MimeMessage implements MimePart {
public MimeMessage(Session session) {
// Dummy implementation
}
public void setFrom(InternetAddress from) {
// Dummy implementation
}
public void setSubject(String subject) {
// Dummy implementation
}
}
/*
* 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.
*/
package jakarta.mail.internet;
public interface MimePart {
// Dummy implementation
}
/*
* 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.
*/
package jakarta.mail.internet;
@SuppressWarnings("unused") // Dummy implementation
public class MimePartDataSource {
public MimePartDataSource(MimePart part) {
// Dummy implementation
}
}
/*
* 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.
*/
package jakarta.mail;
@SuppressWarnings("unused") // Dummy implementation
public class PasswordAuthentication {
public PasswordAuthentication(String user, String password) {
// Dummy implementation
}
}
/*
* 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.
*/
package jakarta.mail;
import java.util.Properties;
@SuppressWarnings("unused") // Dummy implementation
public class Session {
public static Session getInstance(Properties props, Authenticator auth) {
return null;
}
public static Session getInstance(Properties props) {
return null;
}
}
/*
* 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.
*/
package jakarta.persistence;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PersistenceContext {
String name() default "";
String unitName() default "";
PersistenceContextType type() default PersistenceContextType.TRANSACTION;
PersistenceProperty[] properties() default {};
SynchronizationType synchronization() default SynchronizationType.SYNCHRONIZED;
}
/*
* 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.
*/
package jakarta.persistence;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface PersistenceContexts {
PersistenceContext[] value();
}
/*
* 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.
*/
package jakarta.persistence;
public enum PersistenceContextType {
TRANSACTION,
EXTENDED
}
/*
* 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.
*/
package jakarta.persistence;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({})
@Retention(RetentionPolicy.RUNTIME)
public @interface PersistenceProperty {
String name();
String value();
}
/*
* 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.
*/
package jakarta.persistence;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PersistenceUnit {
String name() default "";
String unitName() default "";
}
/*
* 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.
*/
package jakarta.persistence;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface PersistenceUnits {
PersistenceUnit[] value();
}
/*
* 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.
*/
package jakarta.persistence;
public enum SynchronizationType {
SYNCHRONIZED,
UNSYNCHRONIZED
}
/**
* 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.
*/
package jakarta.security.auth.message;
import javax.security.auth.login.LoginException;
public class AuthException extends LoginException {
private static final long serialVersionUID = -1156951780670243758L;
public AuthException() {
}
public AuthException(String msg) {
super(msg);
}
}
/**
* 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.
*/
package jakarta.security.auth.message;
public class AuthStatus {
public static final AuthStatus SUCCESS = new AuthStatus("SUCCESS");
public static final AuthStatus FAILURE = new AuthStatus("FAILURE");
public static final AuthStatus SEND_SUCCESS = new AuthStatus("SEND_SUCCESS");
public static final AuthStatus SEND_FAILURE = new AuthStatus("SEND_FAILURE");
public static final AuthStatus SEND_CONTINUE = new AuthStatus("SEND_CONTINUE");
private final String name;
private AuthStatus(String name) {
this.name = name;
}
@Override
public String toString() {
return name;
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import java.security.Principal;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
/**
* Callback that enables an authentication module to inform the runtime of the
* call principal or name of the caller principal.
*/
public class CallerPrincipalCallback implements Callback {
private final Subject subject;
private final Principal principal;
private final String name;
public CallerPrincipalCallback(Subject subject, Principal principal) {
this.subject = subject;
this.principal = principal;
this.name = null;
}
public CallerPrincipalCallback(Subject subject, String name) {
this.subject = subject;
this.principal = null;
this.name = name;
}
public Subject getSubject() {
return subject;
}
public Principal getPrincipal() {
return principal;
}
public String getName() {
return name;
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import java.security.cert.CertStore;
import javax.security.auth.callback.Callback;
/**
* Callback that enables a runtime to inform authentication modules of the
* CertStore to use.
*/
public class CertStoreCallback implements Callback {
private CertStore certStore;
public CertStoreCallback() {
}
public void setCertStore(CertStore certStore) {
this.certStore = certStore;
}
public CertStore getCertStore() {
return certStore;
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
/**
* Callback that enables an authentication module to inform the runtime of the
* groups a user is in.
*/
public class GroupPrincipalCallback implements Callback {
private final Subject subject;
private final String[] groups;
public GroupPrincipalCallback(Subject subject, String[] groups) {
this.subject = subject;
this.groups = groups;
}
public Subject getSubject() {
return subject;
}
public String[] getGroups() {
return groups;
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import java.util.Arrays;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
/**
* Callback that enables an authentication module to supply a user name and
* password (to a runtime?) and determine if the result of validation.
*/
public class PasswordValidationCallback implements Callback {
private final Subject subject;
private final String username;
private char[] password;
private boolean result;
public PasswordValidationCallback(Subject subject, String username, char[] password) {
this.subject = subject;
this.username = username;
this.password = password;
}
public Subject getSubject() {
return subject;
}
public String getUsername() {
return username;
}
public char[] getPassword() {
return password;
}
public void clearPassword() {
Arrays.fill(password, (char) 0);
password = new char[0];
}
public void setResult(boolean result) {
this.result = result;
}
public boolean getResult() {
return result;
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import java.math.BigInteger;
import java.security.PrivateKey;
import java.security.cert.Certificate;
import javax.security.auth.callback.Callback;
import javax.security.auth.x500.X500Principal;
/**
* Callback that enables an authentication module to request a certificate chain
* and private key from the runtime. The information specifying the chain and
* key may be an alias, a digest, a subject key, or an issuer ID. Other request
* types may be supported.
*/
public class PrivateKeyCallback implements Callback {
private final Request request;
private Certificate[] chain;
private PrivateKey key;
public PrivateKeyCallback(Request request) {
this.request = request;
}
public Request getRequest() {
return request;
}
public void setKey(PrivateKey key, Certificate[] chain) {
this.key = key;
this.chain = chain;
}
public PrivateKey getKey() {
return key;
}
public Certificate[] getChain() {
return chain;
}
public static interface Request {
}
public static class AliasRequest implements Request {
private final String alias;
public AliasRequest(String alias) {
this.alias = alias;
}
public String getAlias() {
return alias;
}
}
public static class DigestRequest implements Request {
private final byte[] digest;
private final String algorithm;
public DigestRequest(byte[] digest, String algorithm) {
this.digest = digest;
this.algorithm = algorithm;
}
public byte[] getDigest() {
return digest;
}
public String getAlgorithm() {
return algorithm;
}
}
public static class SubjectKeyIDRequest implements Request {
private final byte[] subjectKeyID;
public SubjectKeyIDRequest(byte[] subjectKeyID) {
this.subjectKeyID = subjectKeyID;
}
public byte[] getSubjectKeyID() {
return subjectKeyID;
}
}
public static class IssuerSerialNumRequest implements Request {
private final X500Principal issuer;
private final BigInteger serialNum;
public IssuerSerialNumRequest(X500Principal issuer, BigInteger serialNum) {
this.issuer = issuer;
this.serialNum = serialNum;
}
public X500Principal getIssuer() {
return issuer;
}
public BigInteger getSerialNum() {
return serialNum;
}
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import javax.crypto.SecretKey;
import javax.security.auth.callback.Callback;
/**
* A callback enabling an authentication module to request a secret key from the
* runtime, by supplying an alias. Other request types may also be supported.
*/
public class SecretKeyCallback implements Callback {
private final Request request;
private SecretKey key;
public SecretKeyCallback(Request request) {
this.request = request;
}
public Request getRequest() {
return request;
}
public void setKey(SecretKey key) {
this.key = key;
}
public SecretKey getKey() {
return key;
}
public static interface Request {
}
public static class AliasRequest implements Request {
private final String alias;
public AliasRequest(String alias) {
this.alias = alias;
}
public String getAlias() {
return alias;
}
}
}
/**
* 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.
*/
package jakarta.security.auth.message.callback;
import java.security.KeyStore;
import javax.security.auth.callback.Callback;
/**
* A Callback enabling an authentication module to request a truststore from the
* runtime.
*/
public class TrustStoreCallback implements Callback {
private KeyStore trustStore;
public void setTrustStore(KeyStore trustStore) {
this.trustStore = trustStore;
}
public KeyStore getTrustStore() {
return trustStore;
}
}
/**
* 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.
*/
package jakarta.security.auth.message;
import javax.security.auth.Subject;
public interface ClientAuth {
AuthStatus secureRequest(MessageInfo messageInfo, Subject clientSubject) throws AuthException;
AuthStatus validateResponse(MessageInfo messageInfo, Subject clientSubject,
Subject serviceSubject) throws AuthException;
void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException;
}
/**
* 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.
*/
package jakarta.security.auth.message.config;
import jakarta.security.auth.message.MessageInfo;
public interface AuthConfig {
String getMessageLayer();
String getAppContext();
String getAuthContextID(MessageInfo messageInfo);
void refresh();
boolean isProtected();
}
/**
* 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.
*/
package jakarta.security.auth.message.config;
import java.security.AccessController;
import java.security.Permission;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.security.Security;
import java.security.SecurityPermission;
import java.util.Map;
public abstract class AuthConfigFactory {
public static final String DEFAULT_FACTORY_SECURITY_PROPERTY =
"authconfigprovider.factory";
public static final String GET_FACTORY_PERMISSION_NAME =
"getProperty.authconfigprovider.factory";
public static final String SET_FACTORY_PERMISSION_NAME =
"setProperty.authconfigprovider.factory";
public static final String PROVIDER_REGISTRATION_PERMISSION_NAME =
"setProperty.authconfigfactory.provider";
public static final SecurityPermission getFactorySecurityPermission =
new SecurityPermission(GET_FACTORY_PERMISSION_NAME);
public static final SecurityPermission setFactorySecurityPermission =
new SecurityPermission(SET_FACTORY_PERMISSION_NAME);
public static final SecurityPermission providerRegistrationSecurityPermission =
new SecurityPermission(PROVIDER_REGISTRATION_PERMISSION_NAME);
private static final String DEFAULT_JASPI_AUTHCONFIGFACTORYIMPL =
"org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl";
private static volatile AuthConfigFactory factory;
public AuthConfigFactory() {
}
public static AuthConfigFactory getFactory() {
checkPermission(getFactorySecurityPermission);
if (factory != null) {
return factory;
}
synchronized (AuthConfigFactory.class) {
if (factory == null) {
final String className = getFactoryClassName();
try {
factory = AccessController.doPrivileged(
new PrivilegedExceptionAction<AuthConfigFactory>() {
@Override
public AuthConfigFactory run() throws ReflectiveOperationException,
IllegalArgumentException, SecurityException {
// Load this class with the same class loader as used for
// this class. Note that the Thread context class loader
// should not be used since that would trigger a memory leak
// in container environments.
Class<?> clazz = Class.forName(className);
return (AuthConfigFactory) clazz.getConstructor().newInstance();
}
});
} catch (PrivilegedActionException e) {
Exception inner = e.getException();
if (inner instanceof InstantiationException) {
throw (SecurityException) new SecurityException("AuthConfigFactory error:" +
inner.getCause().getMessage()).initCause(inner.getCause());
} else {
throw (SecurityException) new SecurityException(
"AuthConfigFactory error: " + inner).initCause(inner);
}
}
}
}
return factory;
}
public static synchronized void setFactory(AuthConfigFactory factory) {
checkPermission(setFactorySecurityPermission);
AuthConfigFactory.factory = factory;
}
public abstract AuthConfigProvider getConfigProvider(String layer, String appContext,
RegistrationListener listener);
@SuppressWarnings("rawtypes") // JASPIC API uses raw types
public abstract String registerConfigProvider(String className, Map properties, String layer,
String appContext, String description);
public abstract String registerConfigProvider(AuthConfigProvider provider, String layer,
String appContext, String description);
public abstract boolean removeRegistration(String registrationID);
public abstract String[] detachListener(RegistrationListener listener, String layer,
String appContext);
public abstract String[] getRegistrationIDs(AuthConfigProvider provider);
public abstract RegistrationContext getRegistrationContext(String registrationID);
public abstract void refresh();
private static void checkPermission(Permission permission) {
SecurityManager securityManager = System.getSecurityManager();
if (securityManager != null) {
securityManager.checkPermission(permission);
}
}
private static String getFactoryClassName() {
String className = AccessController.doPrivileged(new PrivilegedAction<String>() {
@Override
public String run() {
return Security.getProperty(DEFAULT_FACTORY_SECURITY_PROPERTY);
}
});
if (className != null) {
return className;
}
return DEFAULT_JASPI_AUTHCONFIGFACTORYIMPL;
}
public static interface RegistrationContext {
String getMessageLayer();
String getAppContext();
String getDescription();
boolean isPersistent();
}
}
/**
* 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.
*/
package jakarta.security.auth.message.config;
import javax.security.auth.callback.CallbackHandler;
import jakarta.security.auth.message.AuthException;
public interface AuthConfigProvider {
ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler)
throws AuthException;
ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler handler)
throws AuthException;
void refresh();
}
/**
* 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.
*/
package jakarta.security.auth.message;
import java.util.Map;
public interface MessageInfo {
Object getRequestMessage();
Object getResponseMessage();
void setRequestMessage(Object request);
void setResponseMessage(Object response);
@SuppressWarnings("rawtypes") // JASPIC API uses raw types
Map getMap();
}
/**
* 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.
*/
package jakarta.security.auth.message;
public class MessagePolicy {
private final TargetPolicy[] targetPolicies;
private final boolean mandatory;
public MessagePolicy(TargetPolicy[] targetPolicies, boolean mandatory) {
if (targetPolicies == null) {
throw new IllegalArgumentException("targetPolicies is null");
}
this.targetPolicies = targetPolicies;
this.mandatory = mandatory;
}
public boolean isMandatory() {
return mandatory;
}
public TargetPolicy[] getTargetPolicies() {
if (targetPolicies.length == 0) {
return null;
}
return targetPolicies;
}
public static interface ProtectionPolicy {
static String AUTHENTICATE_SENDER = "#authenticateSender";
static String AUTHENTICATE_CONTENT = "#authenticateContent";
static String AUTHENTICATE_RECIPIENT = "#authenticateRecipient";
String getID();
}
public static interface Target {
Object get(MessageInfo messageInfo);
void remove(MessageInfo messageInfo);
void put(MessageInfo messageInfo, Object data);
}
public static class TargetPolicy {
private final Target[] targets;
private final ProtectionPolicy protectionPolicy;
public TargetPolicy(Target[] targets, ProtectionPolicy protectionPolicy) {
if (protectionPolicy == null) {
throw new IllegalArgumentException("protectionPolicy is null");
}
this.targets = targets;
this.protectionPolicy = protectionPolicy;
}
public Target[] getTargets() {
if (targets == null || targets.length == 0) {
return null;
}
return targets;
}
public ProtectionPolicy getProtectionPolicy() {
return protectionPolicy;
}
}
}
/**
* 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.
*/
package jakarta.security.auth.message;
import javax.security.auth.Subject;
public interface ServerAuth {
AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject,
Subject serviceSubject) throws AuthException;
AuthStatus secureResponse(MessageInfo messageInfo, Subject serviceSubject) throws AuthException;
void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException;
}
This file contains the PGP&GPG keys of various Apache developers.
Please don't use them for email unless you have to. Their main
purpose is code signing.
Apache users: pgp < KEYS
Apache developers:
(pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
or
(gpg --fingerprint --list-sigs <your name>
&& gpg --armor --export <your name>) >> this file.
Apache developers: please ensure that your key is also available via the
PGP keyservers (such as pgpkeys.mit.edu).
Type Bits/KeyID Date User ID
pub 2048/F22C4FED 2001/07/02 Andy Armstrong <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
mQGiBDtAWuURBADZ0KUEyUkSUiTA09e7tvEbX25STsjxrR+DNTainCls+XlkVOij
gBv216lqge9tIsS0L6hCP4OQbFf/64qVtJssX4QXdyiZGb5wpmcj0Mz602Ew8r+N
I0S5NvmogoYWW7BlP4r61jNxO5zrr03KaijM5r4ipJdLUxyOmM6P2jRPUwCg/5gm
bpqiYl7pXX5FgDeB36tmD+UD/06iLqOnoiKO0vMbOk7URclhCObMNrHqxTxozMTS
B9soYURbIeArei+plYo2n+1qB12ayybjhVu3uksXRdT9bEkyxMfslvLbIpDAG8Cz
gNftTbKx/MVS7cQU0II8BKo2Akr+1FZah+sD4ovK8SfkMXUQUbTeefTntsAQKyyU
9M9tA/9on9tBiHFl0qVJht6N4GiJ2G689v7rS2giLgKjetjiCduxBXEgvUSuyQID
nF9ATrpXjITwsRlGKFmpZiFm5oCeCXihIVH0u6q066xNW2AXkLVoJ1l1Rs2Z0lsb
0cq3xEAcwAmYLKQvCtgDV8CYgWKVmPi+49rSuQn7Lo9l02OUbLQgQW5keSBBcm1z
dHJvbmcgPGFuZHlAdGFnaXNoLmNvbT6JAFgEEBECABgFAjtAWuUICwMJCAcCAQoC
GQEFGwMAAAAACgkQajrT9PIsT+1plgCfXAovWnVL3MjrTfcGlFSKw7GHCSYAoJkz
x+r2ANe8/0e+u5ZcYtSaSry+uQINBDtAWuUQCAD2Qle3CH8IF3KiutapQvMF6PlT
ETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZ
X9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56N
oKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kj
wEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obE
AxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAIC
B/0eHkYQ0Rv6s21TgpOzRBon+rQAv9ka0PlC7bj2eYWsCOBib8K7qO8hND0sW59p
0uFQ01X7kC7L/4Ls1HTk0chEZMV0UrGAOKXHY1QFlxrNtFi5U3pTPITXDDfy+g/G
6FTX3PLnGGvwXbtaiAq5UjQ6iXm03lh0BW6Q+kPtm8swPPfqfjYv0rrT+I8Ic3p2
HplWKR2bpi3wqCSKB/AaTQJwTbh2x2+2cPVONPodgjZSJ9eQkErejkNSvqbumlTx
dB81eoGa0Lo2xE7N+DNlCnILGE0X4hPMdj+N5fmyEbyx0WOB8crvCuODGGEQnXs/
zbVO7FP+rj7YWjRh5pVD3bGiiQBMBBgRAgAMBQI7QFrlBRsMAAAAAAoJEGo60/Ty
LE/tj/QAoOFNFa7rbAy+eT6mRNb7XztfcAbWAKD6Gd6S/7lEJU0k2TS5tozt4jMl
vw==
=/91Q
-----END PGP PUBLIC KEY BLOCK-----
Type Bits/KeyID Date User ID
pub 1024D/86867BA6 2001-11-22 Jean-Frederic Clere (jfclere) <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBDv9Gx8RBADclmKwDLcibNVipQnhYW+bFIpuQjQnRrqRwn3gXM+/luzzJYJ4
bbWpw13zjX0EkrAJ8qH2A/d0EIU1eZ0zHrLgRvMUfLGFUX7FFFw18JKFLTVGhG4/
8sSl3ydHSA2Kd1PF6xjBP7iM7sg5dJfEkyMzvK5H4F0ZpTqy3087wsg1wwCgitRy
Zg4x3lWZSkOwBj472qaO9GkD/2q6kyWfAK6XFe3GuB5AAs3poMfN1eqW+duM4TA8
zUiWK0Wxx4JXJbL7n0i4d+JdXJsrjSjF++KKfelcxsrSxoUIBegez25MUSvHe09D
R3nqkY8CVO+viEtzRBqkSgCMbUjAtfkQ+vp2jDnWSmmkNfY0OYAzt+KRyJKcjUSJ
gvOOA/45+DN9wuTELoFTvsXh1JgOL/QvW1fmQ2HrcQk94BkzIsfVGWClCiig5gNw
LCxTbfgA5htpI8U7vPR9/5gH7U8Wy3HR6xQUZxcbttMeYit2VbDEJzF5r5S0pJvD
vyk3n1kiKU7r49sjhxGgE8J/VvDpO6YcIsDs8LoULwuJTg0DTrRDSmVhbi1GcmVk
ZXJpYyBDbGVyZSAoamZjbGVyZSkgPEpGcmVkZXJpYy5DbGVyZUBmdWppdHN1LXNp
ZW1lbnMuY29tPohXBBMRAgAXBQI7/RsfBQsHCgMEAxUDAgMWAgECF4AACgkQ0+/m
toaGe6amGQCeJU5VZ8QCi8+PY0QJHPA63e5uPyoAmgOWIwFm8A/xmW8qjEvVAWtb
TjZxuQENBDv9GyMQBACCbFlSF+udW/Qz2oknDen8Hoql4Q1Q7CUQTbPjoQAcYgZg
LrsR6hc9aCIf3Kt4qZBgQ1Oe9M/AemOFhU04UNp3dgHk91EYRvx80Rua992p/8V7
QOhwIBVb2XE8as5nL2j8w6Jz7eSs/bivxm9yD0AH/I5H01RAJivRbOTsUgSkDwAD
BQP5ARlW2Nqc0U17asQsmMYvT1UMiOiyBwUD/DIEG2Xy1hlEvdljg8WU26jcjpGq
MrT69T4Z+eZ2oVyiRQTW4qMUBKc0Nbz89hL0qv9K41ExxxH+JgE1csRVvmwAT8Iy
lnhof7TJLRBtvan3+p21Kxl1uQ7MbmLT875u+vc+J098fIiIRgQYEQIABgUCO/0b
IwAKCRDT7+a2hoZ7pn9UAJ9f0TK0QQOtjQBvxAissopYhDKHGACePZg0k9sj69yw
nVWrBS9fvFC9jcA=
=BTiM
-----END PGP PUBLIC KEY BLOCK-----
Type Bits/KeyID Date User ID
pub 1024D/E86E29AC 2002-02-13 kevin seguin <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org
mQGiBDxqtR8RBACbySxGrtf+flbowryS1Hj4z3zzEXD4CAEq6RjSGMtIraCDRJfp
6Gexs+lQ6IhpdC4GfX70SUMjXXvT5suhXYeGOM4iJHqUsksgzEKjUqcfj1l3qmOs
/doE8lcGGHcYbMplBcfuop+shZYiv9GEJ3gutwn/dNnhs/QA9bCdIj03lwCgvAcy
QpT5JdTym2p2icd5e91mGIUEAJMw6JHTTcCiyoTRy7k8Cf65d8S7bTDLr6pqJVE2
XU41CvW/pgL31akYAxpeZJJnsBaLaUiqh6K0qgfEMlDwDeC6gVogHBxWkEXdK1dr
tGL4GIUcxQ1+ZvQhGg7dtjanmfMlylVgS+C48awJySkinRmaQDbQ0MKdFchLc/y1
OR3IA/0VkIvlidehMPbZCalqhS9AEsDiFq5/u5AsQzDEp2nmTGlmBqjhc39kEnu4
qKq08az1Gt6Q7sxXbjH/jYtDgd49FW5Yg4k5B3hpTgnbyRE6SGlKksu8qTmYkDve
4rej6pvJRHwp6hDKxDG8qQoLWIgOfVC8960nurqx56QdV9YMsLQga2V2aW4gc2Vn
dWluIDxzZWd1aW5AYXBhY2hlLm9yZz6IVwQTEQIAFwUCPGq1HwULBwoDBAMVAwID
FgIBAheAAAoJEKy3f8Lobims3E0An0x3rrUMIijUMFoqnoT7muNGwmAzAJ990TWj
dZO4ayh1M+cWhjaw9W+44bkBDQQ8arUkEAQApaMm5HUB1Yk2x5MavAs/O4zfWnOx
YFOeXIPfGvhlhF2/Lrjs9icaa/tOM/CTCes19nDWP5Fc+pQxmgSPrgt3fsShwZJe
p3iYodLbM76uXEgSvI4Wh6kwViHbN4V1GxJAd2ZPVb1v+lauGUCOgPFGw99UV9sO
tTRXSbFS6AgqQzMAAwUD/jq6boxlnab/GUmKrILeLkv1X0G2/AEXEGRmG0nkhVdj
OShoqtPr4y/UhMzJUOequs2CdvRlTIyAyZqN7A0Qp4mFfmsvp0dYYssTtE4bCzZe
WxSKgjtBWBHXnH+Qzjb5R2Tz28kAxNY+dt7yxC+CkXWDZq/rsPgsXNbWXT49FnF8
iEYEGBECAAYFAjxqtSQACgkQrLd/wuhuKazl7QCfQkz5t/3T6EtXZCcXz/hlswyI
z30AoLr/7hwXgedEepBk/Gm9HUsbMnM8
=S1mb
-----END PGP PUBLIC KEY BLOCK-----
Type bits keyID Date User ID
pub 1024D/307A10A5 2002-07-18 Henri Gomez *** RPM SIGNING KEY ***
<[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBD02vbERBAC1v8fR6gjERpaz4UMfdy0hRVWCPSbOdF+Swm/IenjVzErco6zb
MTa13umUNrDPBy/tTWiCCZrOnqi7fgDzWqPEqrXJjKAFVLEWE6MmKylPPEPG1/bm
idkNGERSAZduvhKv777PzvEJJ/8eGe3wy/O8NbgIjCPtr4UklwCZS8cFuwCg8oMO
UdT8qZRtzdxdAyu1m5fUb+MD/3IKJYWXsdtb6iBphCU4f/BoyjVC9EZJ1ywLuiVM
siKbuaDUaXU9nWcbNKv+fx8uZ1NaadpfLokqqhnWcpnSiqw8HNR7SwsF1D33rkXK
O4FSuVss/tIoqGdWFcJyPkP4yP5shxqR335narVw2vDa0+BiWkALbA2qVsSIdZDB
LeFZA/47AMBS0U2BRk2rQT8LmMuFl7mR+wNBM4n7FUGdxsGn3TcYd4pXTNrEQPrV
YNdooKlikgGk4hgFnIFX09Spmimqgq0goFue81rttVdZZ4uep8dTghY6gwmvcOxX
jATbhWStBhdu9B35kzfHc+1QihD5Z94u4uyWIVBIzikcdiY8LbQqSGVucmkgR29t
ZXogPGhnb21lekB1c2Vycy5zb3VyY2Vmb3JnZS5uZXQ+iFcEExECABcFAj02vbEF
CwcKAwQDFQMCAxYCAQIXgAAKCRAZMdaEMHoQpYijAKCCP68ndU/kTXR9XAKLvibC
3S8+1QCfUFQYte3Jo+MHKaWjsu9JGptRzo+5Ag0EPTa93RAIAKlsRJ5gOGTFsmaR
W9k6MIh4c/MCy7J7HUxT5xTdHROa+3zUh+FAE/JaOx9ZtZtH863DFHA8cP4L+tpi
PjBT6g2E94dwGcuH/OiSSCT4JSBukbGbOuLLdmFXqUl8+4gsL90Xal67FtNLwyLG
1n7geLir0byD+OT7VLA5w+6G0NOpJEveV/FIa2qLgdRZ8vz73ybgMh18hBUrUmro
jncp0rln2VU7VCH1C2aClKm7kK4mGAjIFIzKbguK+kM3b8NDHmXKpT6syyCtIM3h
prkV1TUCAFqLI32aSdlTN79lpeA2zDga9k4/4X/RDHsFpRN2neRFGTNUtuUgYpQQ
E5zWBmMAAwUH/RiGxyeBsad923IwE1+GAjxFl2tqF9xWk0J6yTnSK4nfhYAE9evV
jwDEok9jRl4ILCcXx6YN/d/lWNuSbARKHz/3hLiTouPpwd3SSJ8is2x9PgpJz5JX
cD0y1SkbPLvs3jH3ZmdcxZpuAmJeI/typqFKK5pWP44oXIH+XH/8nWDtmLEBkgKQ
/ATQWenMTmZ6MIJ6aWKWGkO9QS6iYRz3PPPGQ1O8W02CeprM2wBtlb8J1Z3RxNhM
rZcg/1Qi3V3D1HI4zw6tAFmDeBb8J4PaBQzqlhzx2EBTbfwNPhV8AlPvpxHEeGGn
v+O1yhZr33SnyZdINNoNDn+owVMdmkobe9GIRgQYEQIABgUCPTa93QAKCRAZMdaE
MHoQpRsTAJ4qst3MhLm48fBAEnzuzi/BIKr+AgCfYaCB/AvPoncQbHc8BcNGRimR
P9A=
=hQhz
-----END PGP PUBLIC KEY BLOCK-----
Type Bits/KeyID Date User ID
pub 1024D/564C17A3 2003-01-11 Mladen Turk <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (MingW32)
mQGiBD4fwXIRBAC7WRS8PYxi2YH0T1mX4HCYsF8aHoqxBzMnyFR4J896m1s96vGM
BTSAwH2NKbiVqtfLokTbQkUVxtrgrF2HMB5NfYBg/JzT7pZL/Q2ThWUS7SJQQA4f
a7/DpiLiHalp6iX45om6JTdIWEyXv26csIVhmtlkGBEPRhNRX8X4//BM0wCg7wcA
yQ7c5NmoOJLVs+uHsRrnHo0D/R/dMyuWt7/o0eGIEuRlDl2q+YL8xLuVyJMXQBnd
jo7jKpQ+Q1zl93aVTzsJa7mP2zZ7jqaJ855sdz6rvwyhGF1/qYMtm6zrmgBy2XPm
J+57sfwSZr0bhIeMpCWjIw98z9sObq0v2r2oA3+J9E3Na/BZsCVTZVb3ew7ILmEp
F5D7A/4zvjY41dakCAJsD1Xo8TS6hSqJf4zq9vX3ayJVvUjeo8n4sHNOwcbEnnui
9zZaUH3F0x+3cDo7mS1Y4pD8THuqCZoSbSkiHnlved6nLXsKbqvVrVo+esEhfZCn
Iji3gp+2TVNwdHXGM+4BAzMJCLsdXjByO6SNzB9a+H8RsRlZKrQ8TWxhZGVuIFR1
cmsgKCoqKiBERUZBVUxUIFNJR05JTkcgS0VZICoqKikgPG10dXJrQGFwYWNoZS5v
cmc+iF0EExECAB0FAj4fwXIFCRLP94AFCwcKAwQDFQMCAxYCAQIXgAAKCRAcUGQH
VkwXo0jxAKCgHzXPIB4IAgoD7GMAohPQfX7j2QCeL6pAsf4pPufmPvbrrpDp6rQH
GOS5Ag0EPh/BhhAIAKWzq7+/+nNYGpc7sXGkDNo9xncxcx/KbbJVT0rBteuaonQ4
vYar1ITjIhOPmF9yPmpUddNrqgQTSO+Or+ZrVOndn+qC1gdY3qpKIN3KTjXloW38
0Y84ezwdRLznQNkhgXwNcB55l/Z9kLaW2MS8CJzOuYSQT1CYbXg7XP3684ZmV1KC
cGgcUt9VkIGqwsa2RFDNGvMbySedSkJ/70Q+PJlkXN+W86f8hi3HTjw2MCkNa5NL
+Byg8FEAm95YWrO6kCY3qaJYV7NRt9oVd+2V/NNzwYp3Or/QoYofvfNerupfwBmU
GEXPyZCqqNH6nDv6chscsWvEA9KzhsWnsdKhmHsAAwUH/R6LwfWgtpaO42dQI4ZS
VRBmCeWrXCuyVk0d13Yz0xLi5Z5m4g3MON3d+cRVUiyNX+hbDGpi2mkbsnL559Ef
iqmzDmSz5GQHDutolhOPtLxLrC537ODn2q7hnYQwIQYYIUtYD5sYlzfGYC8olGCB
IcKIdlGRWcxxiFCIJm5CX/jnSBsyDRpanlSrdkxhzAGsifqj4NQ19ayoeNoZg2ZP
9SLIY7vbmOxJeHEYkx8AG25xOY1PLotb/0buSXPB8e71zb/DCV1rAhhUxAr/2JOQ
RqlZBq6PfcHKLRitXRCeVvfldRxuWBIzhuTLUfRPYR6phjP50EzZPlbJzIvGwsOI
RheITAQYEQIADAUCPh/BhgUJEs/3gAAKCRAcUGQHVkwXoy0JAJ9WTfqfYzW/F6qi
5MxmqDnU9/G+6ACfQVmhZNnGTSfcwQCttwCaW3CRhDY=
=MWUr
-----END PGP PUBLIC KEY BLOCK-----
Type bits keyID Date User ID
DSS 3072/1024 0x7C037D42 2003/08/05 *** DEFAULT SIGNING KEY ***
Yoav Shapira <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGP 6.5.8
mQGiBD8u/mgRBAD5WKD5xF3CLrnABeS1DvQQhYH+tJjvAmyZgFkYwaQT7eiiOzLa
PC5knbcBC4nuw+8OOPDFw0Ghb2MFogQzRxD6gpPH2t9eEUsrkPFax2Kw2vNTHRrQ
RGAastmi+EYJsQAoktX2dPseTdrkeJBk240Bfj08ZUFg4uPuho9C45ND6QCg/6SO
FMuan62QE+DwlUiMDo4ZcU0EAMDS8k6Dhb5m/0njO6w9OLTEyzohlsM9AP+4mfgB
NOJYhrzfkFoElOcWSA/V3nmYn2VS0oIYDDtBnjXVWZidzTAWKsbT9/AepS3/P2tG
KMhlXhas+uAiAbMpOglz8fdQ76ivQqyRdS99t4iy/cP2ZC3ShAqZQCacfWY5ZQ8Q
kTILBADvp/eayw8fvtfWQXJ9EjBRbhO4THmP6z8J+4ypG6l0V/RBjDWZybrqibO9
ejnOjQYJNCnfrfpzQ5l6dHyy86zLyg+bkFxeId4jp/IfDfJX90sGbuQahNYYwqTp
SFiDMI3KN5ZhzhGnx+pKQh59pcux3HyKmcpPa4oB0CT828lWuLQfWW9hdiBTaGFw
aXJhIDx5b2F2c0BhcGFjaGUub3JnPokATgQQEQIADgUCPy7+aAQLAwECAhkBAAoJ
ECZhkcN8A31CGLkAoPRDGtLRwjkzS2F/OBPkRHKF9/atAKCIh3Fmcr2Cdn05P4qF
kBe3QeWVt7kDDQQ/Lv5qEAwAzB13VyQ4SuLE8OiOE2eXTpITYfbb6yUOF/32mPfI
fHmwch04dfv2wXPEgxEmK0Ngw+Po1gr9oSgmC66prrNlD6IAUwGgfNaroxIe+g8q
zh90hE/K8xfzpEDp19J3tkItAjbBJstoXp18mAkKjX4t7eRdefXUkk+bGI78KqdL
fDL2Qle3CH8IF3KiutapQvMF6PlTETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0Op
lK33TGSGSfgMg71l6RfUodNQ+PVZX9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPF
RzBhznzJZv8V+bv9kV7HAarTW56NoKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEH
NmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4z
ISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGf
nHy9iUsiGSa6q6Jew1XpTDJvAAICC/4iJF383WNktP9/SxeGVIV74r7C7q5Cxr4a
Liy7pEYs52DEft3JzTCLI5O4+NjOw+hEd3QiIytUJRW66V6zd50h4x9lBfK+eMYz
GKNN7kd3aBmH/vXEsG9m9bK1ExwyWq4uyf76nRx1Ya9YthNWmxPUHQnSrOYNPU0/
beA87ouZG4RL9tYqdu3NKJ4g/DYiaw+twvhSoCUkBEFHFfKLDlv8zyQvPTaPUSAM
Ha5/G2Dj1D5RluMSCEMG1V8+YcYAFh63WEP7Afye0mR1LMJvmlba67ogh0ZSfR+I
ju3lhJ9XOp/2W372F9ZbRJofgofVwHQV6INB5uX7KHAdXtPTss+l1nTmydLhsiPC
5oh99ITPdOm8gRzrP10aFwCnwsqXvr+b7fX/CywpuCOQMIr4sbhbYTTClwDo6E0U
TQ+Nb7PWE+8KuJuobTvMUqDQSQaQBnkpLcvRt3cPppANtkaADAeNf0RqKxxLlym4
AltN8G8IMLtSJoH9xlQHTQA4tEUeKOeJAEYEGBECAAYFAj8u/moACgkQJmGRw3wD
fUJh7ACdE7QuMkzSbxEzTXnbkS61AUPy06QAoI5b613vrWeqg5Gz9C7TzG+FEEoh
=O17Z
-----END PGP PUBLIC KEY BLOCK-----
pub 1024D/33C60243 2004-09-12
Key fingerprint = DCFD 35E0 BF8C A734 4752 DE8B 6FB2 1E89 33C6 0243
uid Mark E D Thomas <[email protected]>
uid Mark E D Thomas <[email protected]>
uid Mark E D Thomas <[email protected]>
sub 2048g/0BECE548 2004-09-12
pub 4096R/2F6059E7 2009-09-18
Key fingerprint = A9C5 DF4D 22E9 9998 D987 5A51 10C0 1C5A 2F60 59E7
uid Mark E D Thomas <[email protected]>
sub 4096R/5E763BEC 2009-09-18
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (MingW32)
mQGiBEFEjegRBADocGttfROvtLGrTOW3xRqZHmFWybmEaI6jmnRdN/1gGXmb3wQL
rHsS3fLFIIOYLPph0Kov9q4qNq36LekShIvjMBDFoj2/wRxaUtFq81asaRZg8Mcw
4kVeIoe8OIOuWmvYhU8SH2jJNUnVVrpTPAa6QWquTmseNi6UJMjLxuL7DwCg//9u
k2yj0vk6e4WSO6Fe5+EkQDED/AjQsy0kj9TpNHkKSSUR2evRlWPYA0YtxBSbsgON
tT0cYipAp5IcYt6Zq5QzHiZreyQXLAjItDS2oGCIXfNbTYJ3kxxJTCU/3wlefVdq
LBh4ttm7gmWaiTDTgG4axLF5oMpAb3m4v6s1KvXVVj2pqkhBknfuoRh1wPqbtwks
7HOIBADVezl1/vny5YzdoqsDx1ByXMLi7CuMexQPllhRbdN+an+ZiJ5YP8J9rPdl
NCELsCCcDKLGLjlp43XfMxsgYAPEZNG2ObjKTarhk3uGYN3aJrx7s+G+c2bu8o2n
SyAFQ1iDsjS87PgSPCONA2/36ZShmv1OjLWz5Vo7hGSPcW4ZdLQiTWFyayBFIEQg
VGhvbWFzIDxtYXJrdEBhcGFjaGUub3JnPohGBBARAgAGBQJJEoLqAAoJEJsf2p88
BiIx2ssAnjsjHqeIOdOQYuNjDxVIqfAQN8vaAJwLv/HLCQwTZdxOFqwt/Pf/Ae5L
6IhGBBARAgAGBQJJE0bmAAoJEJA4TZo1x+lCCH0Anj1yuBFfP+bNK+51xQhqFsSN
cB1vAKCzK5HbowxZd2MjzMU31USprksZTIhGBBARAgAGBQJJGG7wAAoJELDgGPyz
tNmL35kAniTaqQ+uSzJgX1o7Bp8BAFYoQ+o0AKCm4eD3gf06AK20FZwSck8ibIQ2
3ohGBBARAgAGBQJJGekxAAoJEC0hq2VlRht59xoAnRcmnR1vJZsRCGcSuxKv+0nA
FrKsAJ9R7Gdc25unU6zF/UwUs7LdWTIFN4hGBBARAgAGBQJJGjZhAAoJEFuWgBDg
T5qJQLAAniDrgK53AhSBmZRGLU6HaI4jPO6jAJ4gWQWhnovMkAKqLRtc18Z1Q60N
vYhGBBARAgAGBQJJHtOZAAoJEFMmz0Afnhe7pzMAnAu/W6rzeOXe7SoMtbPF4mg/
OycXAJoDQfqJpGoUFEjsoePDY0WOd5hI9YhGBBARAgAGBQJJVjbUAAoJELlbvT+k
PESS4lIAniLTQ0XnArkk0TCIBeSWWRL2SvWjAJ4+9XuK0Mg5Pk2454JbWxXqv0cW
i4hGBBARAgAGBQJJXgPpAAoJEA9FCiZiEL/ADcsAnAns0QDk3Iwb0X1GbhRfRHFf
GeV2AJ9+8rA4UfTtUnFMZZCEdyohyunM5YhKBBARAgAKBQJDme2qAwUDeAAKCRAM
PU85FKClKanOAKCIBOdqECQwSoSS6Bsw/j0rhhhOHQCfTCp+IgPx+uJ9YhhgKDyr
U3psooeIagQQEQIAKgIZAQUbAwAAAAUeAQAAAAUCSrQLBwULCQgHAwUVCgkICwUW
AgMBAAIXgAAKCRBvsh6JM8YCQ/3tAKDTsnK90MamPgLtqRxEDmCMu6mX7ACg5rF4
05TH5JA7h23YfJCsC9ZTeoCIqQQQEQIAaQUCSVsZ6iAcU2FuZGVyIFRlbW1lIDxz
YW5kZXJAdGVtbWUubmV0PiIcU2FuZGVyIFRlbW1lIDxzY3RlbW1lQGFwYWNoZS5v
cmc+HhxTYW5kZXIgVGVtbWUgPHNhbmRlckBtYWMuY29tPgAKCRCyvrxAFSkkr91K
AJ93ymf/0iywAVIno5/T8/QUJSKVBgCfe4UPcLtISs3GI8mpYyjCXq35OEmJARsE
EAECAAYFAkkSbKQACgkQW+YxwZmV0krHkgf407SOW6qaU4nqHUJ5kFPWgcLcVVo2
w4gQ1u6s+HzEXNTmvKZrOIzKJMnttyM2RDklmCwaI/lkJApyMbQoMW5UksTGVgnF
WHKyiYx03SnVNPH+QID9IhPzAvp2rLH9IQUtfu1vxvfsQQEZGNmKXUgaG0OduXTY
J+EkhaIFotOa6pLBcUuqjmbSI840IjnVV5a5wLyonDGFFJ7FbbHDecOcLzI9jmSd
mLQlgXD8XwYe8XqNknc6C4uOniDc+iuDRqzGFAMs7f8YK6C1fh3mWCjuNNQ64wvm
JqvxWinFKh6BpTBecqtXwta1Vzfa3tGKSrWCPfODAUHqXni+hhdEqMftiEYEEBEC
AAYFAkoVTuwACgkQarqkr5Czi1hBvACeLUdijz+jB9K9XGL1O5ZhPv8bEWwAoIIw
5uol5zSFoHcK1WHJI5D9CUhgtCdNYXJrIEUgRCBUaG9tYXMgPG1lZC50aG9tYXNA
dmlyZ2luLm5ldD6IYQQTEQIAIQIbAwIeAQIXgAUCSrQLFgULCQgHAwUVCgkICwUW
AgMBAAAKCRBvsh6JM8YCQ/rAAKCcgX1TjaeqTP62LIxml8Z1hL0cSQCeOZiYPXub
vNxwTWh01BOrh5oztDqIRgQQEQIABgUCSRKC6gAKCRCbH9qfPAYiMTeJAKCfTgLW
8OR8o1SY8DHu5/Lw/QyffQCfefq9NCLX99dWBqQqQhX8Ov/vt1yIRgQQEQIABgUC
SRNG5gAKCRCQOE2aNcfpQsvGAKDh7MWTZaEaEe9zBbiHiUQOtZYsSQCgqdqu199/
TDjuXF+frwmzaZqOB3qIRgQQEQIABgUCSRnpMQAKCRAtIatlZUYbeZNCAJ9e6ogA
O4ZpKrEQHuuJnpPnDYT5fgCaAgyY2X29cnP+r79XpqngCGqKR6iIRgQQEQIABgUC
SRo2ZwAKCRBbloAQ4E+aicu/AJ9w90lBNZNBRpoQ6BpSGi88e7GrOgCfe9sD/Qbj
xJJ4FifW8I0/sHbpaNeIRgQQEQIABgUCSR7TmQAKCRBTJs9AH54XuxYdAJ46GTR8
lGoMPK/hUnjeTZ0neTacyACcC6y/DMgkUi499c/zqq9PbIfq7+2IRgQQEQIABgUC
SVY21AAKCRC5W70/pDxEkvlHAKCKieHMrMKnD2U+43ryLJa1S1hr9gCcDnBl6uvO
7qcTozf9k/S8lYvOGs+IRgQQEQIABgUCSV4D6QAKCRAPRQomYhC/wGLfAKCp+OYb
ANzRA7CKs/3bcGjGmFet+gCffHlkrqm7ZgaBVl/2thvldg+obqmISgQQEQIACgUC
Q5ntuwMFA3gACgkQDD1PORSgpSm/uQCfUdtXgb+/jBVYS9zEFy5MNEssdsIAnRv5
oMNzdqDJ7F/UuU6hUm1QhdkUiKkEEBECAGkFAklbGeogHFNhbmRlciBUZW1tZSA8
c2FuZGVyQHRlbW1lLm5ldD4iHFNhbmRlciBUZW1tZSA8c2N0ZW1tZUBhcGFjaGUu
b3JnPh4cU2FuZGVyIFRlbW1lIDxzYW5kZXJAbWFjLmNvbT4ACgkQsr68QBUpJK/d
SgCfd8pn/9IssAFSJ6Of0/P0FCUilQYAn3uFD3C7SErNxiPJqWMowl6t+ThJiQEc
BBABAgAGBQJJEmykAAoJEFvmMcGZldJKI50H/iCJKvk1gi9oIiL6EISeuSngzsis
Jzcg951BN0GVCvLvvVwKNHD7+myiB2gkKKp2yv/A1DVPaZ7ZNkB4KEPLlorLw7iK
gb4QrqgezJaRcJ3zisTh6JslOKuV/7Ojy4DZOXVFsr7LSFXPgl6O29AEPD6SHjOH
0x6RTJPqrsccQ49/KBAUAm1oMmRhcE7jsMl6Y3gQGIkSxG7Pag9zj5qxeqljdhf+
QbM4cb9a8jPCSvU3RfXH531PILENGpprvH1oFforY7sNyI8AOMQ1on7Pnk09zbNx
lRBq73dV5RCBtg0xF6v4/dA/X1O1cGnXGAYM7Tp6WXifJzPssRySCuwTZvWIRgQQ
EQIABgUCShVO7AAKCRBquqSvkLOLWAz2AKCfHh162MhNPvfzMtvqR3Vz+x92WgCf
e16LZToIN8IUA2Sqyru9Y6J5Hlm0Lk1hcmsgRSBEIFRob21hcyA8bWFyay50aG9t
YXNAc3ByaW5nc291cmNlLmNvbT6IRgQQEQIABgUCSRKC6gAKCRCbH9qfPAYiMUdj
AJ41QcpKYNSt1tHNV3YATFcYf/XIKgCg7MFeSGbpvW1W1/weqnraMzFzLfeIRgQQ
EQIABgUCSRNG5gAKCRCQOE2aNcfpQnTyAKCdCXp8TBXMKajXNbepnP/8AcxuvwCf
ZABpYIEZ2up4mOTpQCKtAfuj3XaIRgQQEQIABgUCSRnpMQAKCRAtIatlZUYbeY7m
AJ4hT6Y9bnDyS2ZQgxDoe0q1KmeLEACfTNOmAvfFCPpJd5jefNSAg5hblpaIRgQQ
EQIABgUCSRo2ZwAKCRBbloAQ4E+aiXu8AJ9+n0GqPb0pLsFd1bHAnbUFE7wQAgCf
YuHmCCO1a7o1ZhOMmTqjQY8znMaIRgQQEQIABgUCSR7TmQAKCRBTJs9AH54Xu8TF
AJ46JXUYFXbZocbqNxfhfusocDncxQCg180xr/NoOPTmUqne1xT3CNb2gJSIRgQQ
EQIABgUCSVY21AAKCRC5W70/pDxEkm2rAJ9sBYuejJ4w8CXwSSiH56j26JnqqACf
dwaQ5K/fBzZCZO3XeHq/CGF+uQmIRgQQEQIABgUCSV4D6QAKCRAPRQomYhC/wJ8p
AKChOJ08LU1Ji+c0TdCrUS3xHPusvACfX4b7m9UU4KPSjFBt86Wy+7Tl/1iIYQQT
EQIAIQIbAwIeAQIXgAUCSrQLFgULCQgHAwUVCgkICwUWAgMBAAAKCRBvsh6JM8YC
QyLIAKDfzPcdTFN6Iu7MENRKHRgkhlWwcwCg4WwimtdbIuNUaJlHAaDCkXDOK66I
qQQQEQIAaQUCSVsZ6iAcU2FuZGVyIFRlbW1lIDxzYW5kZXJAdGVtbWUubmV0PiIc
U2FuZGVyIFRlbW1lIDxzY3RlbW1lQGFwYWNoZS5vcmc+HhxTYW5kZXIgVGVtbWUg
PHNhbmRlckBtYWMuY29tPgAKCRCyvrxAFSkkr91KAJ93ymf/0iywAVIno5/T8/QU
JSKVBgCfe4UPcLtISs3GI8mpYyjCXq35OEmJARwEEAECAAYFAkkSbKQACgkQW+Yx
wZmV0krGSgf/RlmcEUwth7OQkmpIGPeGbrfjpbuK/AV0+Q8nBJAsAWiMl1ydBo9m
L3oSh2D+0G3gLCyckgA1bcsNdtxMPctxJdmju3rWbq0cEVG26U/qeRDjkZafLa8n
iPReRVRuJP9uAgQ19cv7mOYjRiEjTqeA2IJ8J2RWLZSOf/3u4mWwjq6hMXKGxHc4
phKVQyjgRh45DzG3wuXa5FpHaG1gYgkUhIvW+RGPbuvKNKMSRIuXs8GzsTbWvNWG
/aAOG8B3gR48hQCq7Ja//+ebfKWWi0c37X09VHt9VlNrhWvKziDaofwsobbAa2+F
fby/1fBgoMVNdmtvXWlzugkQ+G3xXZkzdIhGBBARAgAGBQJKFU7sAAoJEGq6pK+Q
s4tYOREAn3tCOMDivfkSiyRdAOB8sjd8H76KAKDFbj1BkgeYIzWQhHxR0SHC9eoL
NLkCDQRBRI3pEAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlLOCDaAadWoxTp
j0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z4VeSWc39
uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBYK+X0iP1Y
TknbzSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WMuF040zT9
fBdXQ6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmWn6vQClCb
AkbTCD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwACAggAri0hN7wUjnkzDNOHs7j7
eM2VKdDxUBkC9287maduH9fEvD9wXphgJNldx2WCZs5jYHeC9LyAvcchXbiAhYG4
lfbssyj8B7woEMGrqRbxSxp+0PSydJ5WsBjeyptd7yUxt660/1DCsC05PiDBGEMF
IAYbeh05wWjPlKlcf3geDx6G4preUXnc/Qp0+A65QNDOjod3j1gQ+vTZ4cKNgDeN
nV/1tinJw3tokTbvyRGzmLLLI9Ht1Zh8BJsGtOuE6UKcNXwpclu7H+GljnEL3E9d
kdITb0YU0dU1dKc4yDJG0T5EXs4SGOeQE0yH3Gma8PmLm5psP6af9cCA0cx3sTqv
a4hMBBgRAgAMBQJBRI3pBRsMAAAAAAoJEG+yHokzxgJDfKIAoOLR5oMpV8OGN7ox
fieHH9qJZRmtAJ0ZMl/F/rvzazItoNsYRL6bE2wBlpkCDQRKtA7pARAA+I6Lxzjy
Q8aA/iZztRqNpIsKYEVC2rBpa1SrklHT+sM3Gqlpl6arTiSisFtjEBUC5oO50PUY
ycMt0AmyjQyUAP28G0E9Re1s0ws9kur8QuM8SnJOLekWQatnSbGChdAhIemX2OHZ
ir4avt4rLUqBUXR2KDjxlmabkQ6n2T3Rpv5t9+f+ihh+faMrJ9TRO2tmvpGc4wUh
IL9t/peGdUYO/n6c9SXHR0nQtmfmUcTC9uXlWrUVc+MrwzmSLag1ET9uM1jqHcYG
6JXVemPPAt7/+ykUftb5Jc5LgNhahfEOK/9n9LLuzFFb4kHMtvcv0ZS0g002KFZQ
mdZ4teKhVOx6cONyibYF5nFMKt9U9fkpV3WIzSdWhZFIvAYwhw3EoBPyEXilGp4x
85uF0spig03qqs4nYuJOjww+I8h2/JPL8Yuqk+lHZ5XH6OTQZJFE9U2roRMvJLR4
W5fZOtAb7zAT/ZenFEYiYNVku+3oCOD//NqD288xYhhal8iSlC1YMbXUNyYpAqaH
ad39X4ej5WGcJFuMQiSybnCeTIkKdOxwJDFVucPpPF77pOIuarodzftpMyhzjokA
g5jdLM9F4zhPu1wbzNZb89/lGqy34ElZlvGoXi3e3miJeSLQZPPOOGSetC60PiYi
Kr6iXpsciDOnqaGb2OWt2bIWaXC4pQuYVvEAEQEAAbQiTWFyayBFIEQgVGhvbWFz
IDxtYXJrdEBhcGFjaGUub3JnPokCNwQTAQoAIQUCSrQO6QIbAwULCQgHAwUVCgkI
CwUWAgMBAAIeAQIXgAAKCRAQwBxaL2BZ59mIEACjehSxvyNSI9z1JQv1zZYWrEMT
3hN8Njr7bcHjkD2JG5SfZx7Rh+aTahtv6qBkoZaSNOIycvRsVijqOzVeL+zNJm1Z
Ql1YI3ZbzBVnS+5Z6HIIMCQBXo0HGJVbccobuJudCwbwbpxIcQm0HCp51ppAeznJ
tCHLWqo3PawnNRf2jYVTFKSdMxtZMk6fYcbzek2wkJWnDMeaHE1sy9M5+kGYW1H6
2MH8WCZkp5FWGTmM1yFyLCzebCfUOD/LY2OKloHfm0Lzqj1q5My/S1UZxjq0mCLK
DOc1naI9YNYJTMyv2aiXUaqqgYXuhWE214qc/KF/Ipgnm3GsWZ3y4Roqql/sg2t2
FMA4qqJvrGTnNIlxrypKpbTy6TXhdDFU+2mY2pbEP79mLG9uEUJfRX431pr0/GT1
s/CqK3tQCOFHCCIBVbTPs7i5S/QiLBo4PoBwxNnYWQ2NKn4s5Ry/QqAFlAzN6SH8
TNleAUZ9cTvo/5jKHYY5mC2b5xVc+ChpDTu8EZKHwADSFmKN1iOcfNwRgx9+9bdz
Ua66UkhT9F6UF+vy3mo9o+lOqbgAS9qgcYbHLDunIXN7uP/tNfX3/qXmVbHPbbXE
0F7CiLo5jG/KdrJObrJr+jylV96Fv0QMaW1R1OZGeacdR6u5jEHWXy7OX3+GMplw
R9Ns+P0Zksz2ptF2+bkCDQRKtA7pARAAwjRJMLOWK6AZm7vO/PV39NOoE5eS8w/x
3bd7AKfYgnz4LnDvpe1PsW6NVx0zCUMBFX0vkcd0W2i2ERvoVOxbiS0Af+TWggzU
bqsOSh8kLSVB/s6POCKqnzMxvGjknR4Ncq9sSh+EE5oEDjQbv1tMRGZma6Ok42Dc
JJNqcFytsriJmT1DsvpitahfFpt4U7ZDxPhRUjRSGnhw6Expsf9EYrvyu3TSU6wt
E5UaZ9iunetMwed2GE3PtA2Eg8gdBbqV4gMf/lxBp90O3jYtgVesOdL+a+dUD/M6
bYhX5THxSjQH1fMUuTLXkHffGEuaqnfyz6N4EuRxT0Gki9JN0Uwpb+30DR3GRapr
9DlqYses5tp6WMYarEwxnkmudv7l3oVVxeSbm2BYnzEi6WxlWana5huYa9nMnMbI
xYmNMyTmkYrZjfyVmzhi4sK3DeLpCjchZ7RRuYz2hZyXcfax38iTXhfXIL/SZWXh
cSelqiAIZSjrh9yvP6ctEjxOmThX0aNGFMb4duSv7IjnDy5utd2jscmO2H0PDBNr
4J+yNJgLYPWpvmBQ2mxqo/N/aHcGXc2b9k9plB58mxUyRQbjFhlimLLWA0unmRJo
bqWz71CpA7oP5jvoHaPqUihfWEugzOUbQnUzSauDWWOdMqQW+UUo/iDRz6HCKdlf
ww0288krLusAEQEAAYkCHwQYAQoACQUCSrQO6QIbDAAKCRAQwBxaL2BZ5y3tD/4t
+KCuXBNi5alBCExHEzveMdRF9FJrSqJEX0NwGFivF3hQ/HJkrcu9oTJC/tXNFf/+
EHOd0lMiyFl5PBSlhe4XS988rgapUW+ee9tQmAt+RgP40fdKdJNb6+9NYGmrdnDU
zlQtP+h/XBOcmF0/szK/U0oigg8DjYYUm5gCWXOl9H4LJgg+yOcVCOVa4oTf1sdA
mQba1xlMhOIYBWmEhqbWZpGOS59XvpyNfOQXWu26S8HACBqyPZ2LVV4H+9cmxinT
z7RX1yKD17nLZ/fTOzZ1gYTbhg5rNmFpDgu3nlgU8SpGQ1kd70ZkcudgehsUe1Ep
Pyl7O8qhj5H0/3OAmRXzrq2VF17gtz7zpntA0JqsBMbSaK5qBuBcurLhBT634WDI
oE8u5Em1UwjgTI0Cx/lPxRTbIb4PfjP2b2ik/tJaUbwUrhuZ4LAtGztMVrF4W+qn
x9oed4OFXMBbwgS+SH6oAHlGwpxhhzXBlqZsHXm+w+2oazWUhxFFGEe5U245GEtN
f0AznBMDWTqg0SCVEDjlKt+e9tVXkTpHYWZjGbRZbEHkCbFqKhq0KP5BGInFZTFT
oI5jjszmuX0W/yKpRpQZ+GuJnt4VrYSy7TMvjjhIpuhDY57VUwUIkz/2Kq8Vg2wp
Gg+29nvcGOTdyZUcTCEB33B2jQ9z0XUEp+6B2F5iZQ==
=hSkx
-----END PGP PUBLIC KEY BLOCK-----
pub 1024D/288584E7 2008-07-02
uid Rémy Maucherat <[email protected]>
sub 4096g/4B6FAEFB 2008-07-02
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)
mQGiBEhrfkMRBADbIagwebBmnRUKF/g699t9ozZeqI75uCkHoqwji1rxVDSeJskU
DguBbC9kpMT6m2Qr4MRYEHItXccsT5FPMM94P0VF7zL8sTCNRmLsLSq/dX4C2YuX
ejGaLIQ/P1kkqvXJc1BU8tduJyo3FNaAGjGzWmcx6yDUq6NVFaKBi2GdowCg4/+s
rgxoktNz97a1KRVyEkjGEFEEAJMl73H6AyimIfKoAVmlPlE4KZvJNtmybF3Ws86M
CAraW9j/yhIRkkOiFZ1dKnxpFPBLHImzfXXFIt1/vJm1PCQUx2jaEQXZIMl/YNU3
57+5AjkbjWD6pKG7axWcsuPQ5uTGmqAspBNscLaEbqA29luDmrIcyL6SD8WW9uA9
KPyCBAC9nCXxKyLsHLqluHAi0wld+A5x2q7RISkxDAuveroi6AYP3TZof4FEi9Mt
hKsw7sVJD6Tpnz7qqSWx77hCeNVy4t10u11Jgd2s3ieqh4Zt5WKmVCdsuubLE9/c
WsViJopWYJ2YOZaPtDi8t7HFW0vjVTYKG7zEpURgYqHZr8GcbrQhUsOpbXkgTWF1
Y2hlcmF0IDxyZW1tQGFwYWNoZS5vcmc+iGAEExECACAFAkhrfkMCGwMGCwkIBwMC
BBUCCAMEFgIDAQIeAQIXgAAKCRA8NwOJKIWE5zIHAJ9T+cL0L1oABSUxS4ae9UQI
WB5hHQCeJWQhnEpBzrQ5EmHCSeoGDhl9Q3KIRgQQEQIABgUCSGuIMAAKCRAPRQom
YhC/wOoBAKCeWVTg4wkwbtGwcY8IdBZhYKhvVwCeNXq6lQaUa4l4sxxjBLS9MTQ0
0vq5BA0ESGt+QxAQAMQMOJ3K9Z6gAaElTt9ZgPtdQtztA1iDesRmrN1ovbKmGptl
Hkg6B/nRZXIgHke6TNfXxoJ5MOj1pHZibyC4G8B0H2dKieR+yw+P55GVKSDUMGuk
ewBWdbfOLapQCtK5oYvWHycRFCttk4QnXdTrtwbSXYIC0fiwMoz5OF20CQloqFMn
k7BVeKbppbiue0Nu9oiWBDGA9WvjwtePVGAlIQ2Oh6ubt2Bf+lfiBE0E2DjMRcYn
/M+qRUI8LsoISyxUWoYEB4wZxwiPQYaxVUdiOWDlVR+jgYK+GIMQtTaFqxXESFTR
6DXlGGvpiOpfTTATuuqgVd5qhOXoLxyB4J7987Puv/SshCl1Y64T9coFkmAce2k6
eZNJdbKvVffPzrUjBv4w3poN7iBs5N+g655s2bHY7D6yIUIGIh19NsLroYDHlC4T
vF70SP/1l64T8w+srgynHDGYPzKQLdTq2y43YSr0RIVARNpUDQ385/aCbBLze3Su
v+sxhvAhEIWTL9XTWiTo32RR/b+uMNsbWF9hNLli+vI60kgduyw0LbHU0aIpbIZk
5FaCLblub2EzBG4MmOrFX6VTlkWz5I/oIxTM7yesJV5aF6WA0u9rhQy1cvgj8dHa
h+Vwf74SNJiR4OZrV7Pl1uVU05MhO8YQx50mEJRKNe6BA+vvQW4AW7w9zz1/AAUR
D/9FXBgYltaBLgzftIctM7MAV7CXNDvXBmZSAvHbfa9iLEHc+sQGmvpWYHJ/uOs5
GbOxZcYCj7qFTkhCa/jbwO6PYkneBbKfZf3L4lXXaOi+pLOn+LD6QvZtvR6WLYue
d0akCTc/vftbPbsk56PqV4CFGv5vIzEkxACAaT9nchHH+7iHLbrMj9+XG+k6mcrD
8knF04xgDN5P9TkngFfabLPXXpYrJ8ZpHxUN2Qrh06P2dN97vimYXCZB87lUncHu
WpFmWOS4K1aF+Xexi3mZaXdRwGY1oPEFj9lzhUe8S99eHFY5ru9xbV5uPei5C9xo
qVNf6D1UaqqJOkShnvYlzFBUliYKqE0ksE6EXa95qAGqdm5GxXqjsQEXZ3IipAW8
HUSeX4d/ze+GHs4hIT2ATE0ShANoVq0boeTzn9zWXleHO75L895t01ZeybJofMkC
JHuAhV3LbtthMlxiBrJwkBenpP63i/Kyz9GeafMfhsXC9M2FtnEI9ZSOlu9/ZWXl
f21tGr3pMXYuWurs7GMwZzzhELLhQxgG15p5MPAzWWlZ/j7nXJ2pQWZC/zL4a2DA
hTHsiZd36PIoLON5IFXxDjKFHKLSPH3xNbXVQArNEyUgtR6WUUeeB3k6DCbx1bfJ
0UVWWirO0eUtXCm2dHFD3WDq6pMUkRou5gMrzSjCxh6mOYhJBBgRAgAJBQJIa35D
AhsMAAoJEDw3A4kohYTncYsAn0ULUIAZf6x+A81JFu6MsqtrZxkRAJ4uWAXFhEtj
SiHKkU7BarrCyjm1Kg==
=1Oke
-----END PGP PUBLIC KEY BLOCK-----
pub 1024D/0D811BBE 2006-11-14
Key fingerprint = F3A0 4C59 5DB5 B6A5 F1EC A43E 3B7B BB10 0D81 1BBE
uid Yoav Shapira <[email protected]>
sig 3 0D811BBE 2006-11-14 Yoav Shapira <[email protected]>
sub 2048g/286BACF1 2006-11-14
sig 0D811BBE 2006-11-14 Yoav Shapira <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (MingW32)
mQGiBEVZ4AwRBAC9WDbCjRX9Q81Con7cycGkkui6JZndLhX3Jbzlc/eHG0/fUetP
0c5ZdIvTyjj+L/DRI6btrgl+jR64qkuapsYD/KDXQGkpK5zPpmxUPmXJ5tfVTbOj
gacUm2cZjYjSK3dsIs4sDUqNYfBfdwesJ+Hycc7XqkTF1lO2MN9yp8g+4wCg0W8x
/ZYCTb9D8JOPzfSNf8cIFCkD/j5GXA2xlSXuAFBgWpFak5OkeF8cwEkv0CQ0zCqP
R/rTmDGO/73dpQEzgY+gLMSvtkK0pVEYaE15lg2mxma9d0pGE+fmsu5w7SQUip15
HN5E3qP/VB4X1yp+YiHPGTDjRgJm+xbvTGSFFr0wNSSYCVpVGdYHNmetYsB5JqkH
YmiWA/4vnkWnkzQeUNNPvep0lSrEG9jiON4k/d5opWwjxIP4aev8V7//V9ASzznF
D6eEL23ePX5ZuKLyDeOSRAwaPpa/Rp4AkiUGzKK21wAwKip+lcbT5m2ButoQhgNI
ZlmnfhN7E2t2S6iS9VzHEo1S8Jv9uQZJ89Tp5fiFe1pXL2qBHrQhWW9hdiBTaGFw
aXJhIDx5b2F2c0Bjb21wdXRlci5vcmc+iGAEExECACAFAkVZ4AwCGwMGCwkIBwMC
BBUCCAMEFgIDAQIeAQIXgAAKCRA7e7sQDYEbvgiLAKDHEgeJyxlrxNJ4m51jOnhG
xlsLOQCbBWAdTjpMVcNqmd6Fa5fgyCbh8XS5Ag0ERVngFBAIAIEVU1iOoq4CyD3I
f+AChfSFAgqjKmjqEyPv2RDLPkI3g2FvC6HvOlUucIe6IjqvTXztdxSRQu2EGq5i
W8e5ajTZiI9ZNs26XLL4/q/gYRaDjUsI7J3PAOL9lNdws6ZoqlCh44R/cvekuixx
HoHGskGxAHBRdjv9Oqy4x5hR5kebGq9Ayf8CQZ3l7aRekwlMUyCsmMkNxmqMls2g
ViBFD0/9a/xodE2VMVMg5eQ8A0enlrGDghG9d2m586JtOje55rMVnVPkEuNkz9AC
DkR0CiwQqX72Ub10t/qcNqbDeMHFacOBYRKfS7Qdm3/jb8Tc4jO/AXFcUGbH5niz
pPGs+UMAAwUH/1M2unaFyfJddVPQRZCJEFxdlxkg40tewgjaNJLwnqOJXw1RENNM
bSx4Gvz8M6WvZtkvITt29P+O4EmGq+LYTKmLM/E399KuqoZGbyCu3Gm+RIxKmRkf
Y3izseOhrUX2ycUIOF1BFzIYs6HeO/sZeba1bapOFo/xS6NwnuJl6uXUmynGjVtY
gvQ+dLYAcDXUQJd+QjyXdsbnp1jmdSrqqscPGOquRAw7/sp/ivom4DDHMTz4HErz
NfHzn4z8kUE7T1EEpnFU4SBiJkpm/+yEhEq9hDG2GZmxfQd34iRXpC5B4ZbRiwW8
p/bhzvcxZcrahQzu5yyq2+kGhK7IA9APFGSISQQYEQIACQUCRVngFAIbDAAKCRA7
e7sQDYEbvppSAJ9+i7TzCNvZ4PK/odiIWeZ61+KKyACfSjQXnC5UbxndwtkOzFKf
Io8ZP0E=
=xT1M
-----END PGP PUBLIC KEY BLOCK-----
pub 4096R/731FABEE 2011-05-27
Key fingerprint = 9BA4 4C26 2138 5CB9 66EB A586 F72C 284D 731F ABEE
uid Tim Whittington (CODE SIGNING KEY) <[email protected]>
sig 3 731FABEE 2011-05-27 Tim Whittington (CODE SIGNING KEY) <[email protected]>
sub 4096R/461B342D 2011-05-27
sig 731FABEE 2011-05-27 Tim Whittington (CODE SIGNING KEY) <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (Darwin)
mQINBE3fcdABEADmpbGMmnQiMc4biU+CIhV6EJ7lBaRzXzh4tJ4eITfw6IbImDRn
0JHZNjeE5zXLeH0PQ0K8/bYzFhMGwQOgvZETV7LPVLid6F9LbvDnItcWyoiZ+HPG
9SNdxIAsIVxchW6j/4NcIWaEwJks/+3vveBbRc1q0UgL5b72Yxpwwk3o6LMb08vJ
wn0LuljqM/+MHc+/KuxO54jJZ2OwNbKr2cxsYwVCpj+vEF6wNh2s6v+5VLs7NimN
UufiKVGcz6fceza3eYOS+0aLe4JXUPfmbad55x7H7wGMbfv+XLsBUKJ9Bz5nF3QD
jLwGBId8/K51yXGqZUqwjzTkhIalJeZEMZuAxGkLXsYM47OH/BGPNvqfcX6X+17i
9urz5go5kWQJJLGiBDVxiwpyrcZfrqc2I0DicLUsAbdyd6q6gkEcQKLCFmm9GTW8
c0Bb/kqlfGnDcBBl3kwK8MvvTeEAq7mteZEEOu/aV+417qDx+dNzFIx/jVjkihnC
O10vIXKmog8Dy36gNuJdnqsNuV8oGK4vPRFy80XajmYBl94xfR/ZsWWo7y66UGQr
NsCrCC+DV/AlDMJE8fjoLKyTtGnu7U5keyiuUIPvDurbrn2JKGefRnlRAoXRWdiO
nzO7vBbfOQ4g3pjUwuXqQTBzqHwnL9z8gX/MR0Wm5RU+B0ZielPkrt82YQARAQAB
tDRUaW0gV2hpdHRpbmd0b24gKENPREUgU0lHTklORyBLRVkpIDx0aW13QGFwYWNo
ZS5vcmc+iQI4BBMBAgAiBQJN33HQAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
gAAKCRD3LChNcx+r7gOgD/9DgtptXELyFxaazptqmNkjIp6X4JKjl1Kp99Aq2wwR
4DdHBbZNN2qpQ+Q66klxWeJRbf3t2z/4oCkY3G9g+UB0NTgZBcBMl9c4sDxYzlC/
B9GaHTByaXLWhqv5I6IAiiECiyxhkAVHVqDYjpg5voCD0ZcYSWX9IMZLGAlBU2fe
/0g0QEaAV+4SSFsnp7xGaEwoFQd7VH9bS9Q8mdCPZf96Dz7S8XlSpm7Wc0Wvsd7z
wXGqmBZVQ0w4mVhGWeaaRUKuVn5nDF6djI+Erg079Vrla6pcXfoBiIugLOUhvvmv
Zb5yBi+RJ5CQAnb8ApKm1IXotUCq4GJ05SwDR7xvpS/s8BKIlXmY6h64q7sy66a1
SdRtKL5dncVptknxVzyw3QjEMt9Q9v9W5kgeSabebjAztzPFRR9EBxWkcpL8lwml
bTSlheb/+fsEiE0Hw6460xCLPtLFm2RnigdacQgSffhtEzZ5OB7aoXRG/M1McN1v
zrjHxg8Vo7stPiGSSvWQKZJQFvWgFUbugoOum5GTNFJeHwlAyjBydkLJ0A/nwUgD
efXMV8a65+LUAFVJuEgnOw2Ut68bU96KOSHbNaauErqiWZlcnJIOqD3wRxB3OtBc
2lFL49n3bJ37k7CuhEZUAgU/cqN7meH0wo1aI4KOfo5PHm548qckLi4P/pAj8jHL
0bkCDQRN33HQARAAzeAQNb4AfB9v4r3qrN3bwF01VdMpVTaQl3RaJKGbdO52f4gW
8iIfR+Xc6ALeX/1ADsH6nyOuQ+gnTpf4Gr09Lf/EzcrJRN8okVFehjuaahWYdmbL
rln3ZorzbLxHp52dvLS1EX9L1+MEgGuUxsN9fDJSuif6f7+E/a80Q/WEbQ3261lB
f7GDSGvr3xz6M0OlTS08YgUeUsx33PQRHV1TU9RTSASsivy316u86gxMp+9PJ+6n
m99iNvZB1VXpthG6ybgyxhheQv1o2SBAhJ3Ee6Neds1kPkLiKiAbGq9K9IApqC8X
DYZ9FUYBT+CGm8KbU8QS10wJuIVIXRYuvNZBjjhZdbGIGJ2CGIn9cO8RmzDVVu0A
Ch9gCGh12Rsr4uZkY9tJ6/+s/ipHuft1AnPETbrET2Wm1rrUZ8sFykP6cOwP0gen
MNEjTAHnLE0x2yAjFfvjz/y0H+gMQqcbmyGvAgY0URl41+5+yxtLVJIcuszut77s
DV7sM8CoXz2I8/K+R/lB5p8d6AriAV+iYqzATmyfFD27GVHp18wTuyusfwy8301q
CqjZdR5cXQHcp+/yCxz/I+PXx21QE4e3nY8YpC6PWFC/XPy7s6L71uNauqPi5WwG
1CeYEwqd70Ds3aeVErYZxYg/kiInfFGnXjUplvz2goT3LQFWHFS5TN0sUqsAEQEA
AYkCHwQYAQIACQUCTd9x0AIbDAAKCRD3LChNcx+r7jscEADgCt4SmzeEWuU1fZYx
FsdnC3wLZUU57HnGMAQdxCzC6lMXNHUiS+y8of1TEYccjM8JK0zSTwnizhbQzOkh
ICR/0tGz3qCOAZjv91YHs5RcLzeWxbor29my4VlQU6vqEwOEPwFz1b1Grp2rbwhL
hot81tqv4PP/wn3ES/FIuTALZ3/hgunfGlO6FGZC20rtOJHd6DpX2ZPeYi2mfYom
KF9N7F9q0WhYn0GvMyV5pqZ6Ui7N8egvw1gokUtO3D8lWnjZy1BmbizozyLmrG13
xr280Juv7zM0Jy5YR01vsqfvClBbczBzoEnkRijMYVJgUj03dr5Cdn5HFRfA5wLD
sNuSYKMTL/WWNQgIp24/MLxyYa4sVH9WMh9a7BbdRHJEjVR2HTA/lqrKVIfR6NwT
6DhThBA7XxGbQ9nuBOjClTpRBXyCnFN+krmyhvVk3caVcQu/BbaZZXFEuKhJzbon
YrQkfyvT/rQoM/ufLlIIPZgpKxP96a9zF/eyATiamAnU7idEHIZ0Drrj60vz4sPH
A5Ty5GWKYSZa6suPaalqZ+7dpD/UWiNMzSX+YPLQUW9jH/k7zuJ9aZN4AmIkm30c
YB5npZhfo59tF4uuvKvYKWghrF8wSwEE7F4cJAuqklo0TArBUd2WB0Wl8kAWtThf
/PLn/VX9dZEFVPVbPapJpkNv8A==
=Vxhw
-----END PGP PUBLIC KEY BLOCK-----
pub 3072D/0D498E23 2013-01-14
uid Mladen Turk (Default signing key) <[email protected]>
sig 3 0D498E23 2013-01-14 Mladen Turk (Default signing key) <[email protected]>
sub 4096g/DC3D1B18 2013-01-14
sig 0D498E23 2013-01-14 Mladen Turk (Default signing key) <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQSuBFDzsBQRDADVTeaOjvWuZ84mWFi5Rj0TmnIOdK9evO+6Bnr6eI0MCKxLfEYu
tpcq3hrIN/sXoVJW14Kb2Vm5Zt0PLWBmlQoi+99QwfHRvrejQnYA5VCGql61Vkbz
NbpZ3Eq3n9d1HOLhdRnZAUGYtFYm7etkdpUZSHOErZWdiCebc8Og2NdWU4xIG6f8
16UxuzOWv+fPCtSjciHxYWmzrVc4fYNTvJiyN5OtJ08dCaRfMeAMqec4fNMOn1uX
KXuwlFsHk5ieK4K91RP1zSGQEe1gGaMDSQsR6wwmnnEoP7QzlvPkr5gni2+uGccl
UCfejUUQaBsEXDX+S9CesFLv/EtWMgjpnyVCF+uSCrj/pMNHJHX1zktp79NJFCJM
BrifvthC7cVHl5eWVTMb+xFC9leEKcUPQj8GQmUlXKd3iiUCQEhoEAk9IC0cVaMq
2wp2lZRAK+7MSO+iLYA6GSeCBBQowCC8fvc/1ihZ+JtcmR0uqErrLRpSfBbn6Ynw
K6cu+Dd6zRBOegcBAMIQg3biwAjnP6AhB3Ul8J/Jlk3CL/v+ChMUuwTGgDKlC/9C
kg3KctWPhlImHATy1STBBqIoebYxe+CCxxiukt9gp2NCZOdm2ZU7weT9kS7DYQz8
scKcAbSFBTILSeDOHehCb1Qz47H3JfyRzv23VoJ4hA/0sfm1kWeqXwQEBkAtZfrF
/C/N0Sdnf2OUf7LsEDdkaVzkVQVJZLzZGjpNq+W8zoHhOOi1KwIzx8y1opEysmiv
/CitQOhnLJT5odM1a+AimUjdgyQ0p+U1EkcAnLAYD3UIKMA8wnGzfJZJ4tkrYkBu
YLW/lyS50ddhzPniz2XeCc5SG+tCi8le4B+qZb4GhC+nKXD+heuRXA+45hQXEx9M
dGgsormYKnCTF5v3Bf8sSnId8nj0eBbKZFJhUBVgNpwNrW5QjYfJHGHTMBnWy/Jv
SF3CnWwg/IPTNcX9ctxL4FatpPREXE/Su/4/BDjm3R14cCBfBeiVdcRZ6J1TLuLP
K+qcT62PHqd/ibthfkLlnuehr4Qsfy75UypY8/2zrLz9QCIEo8MEFcUicfc+HB8L
/1AYsI4c1lkgOU8aubasn1GpNrvyz5NrehIPevPEjSeBGJnOxQEtWKDrD8TMd+Or
7r9+SLGVog1NYnkhzdEGbO1m/VXGk7JQI6UU5Rgu3PaJbfBPnON9kABfDnIQMqH1
LeylZUqAnnv4Fa3YtiQOyro3FM8Gv+r2E40SgIbX1bLfCzgqdYpDIIK1FLfCu9oO
NiMolC4gl+zOjCQ+ilV74J4vODBX701Zg3nM9WnQcXBBrNcuz2ofTzg9wm61zjsE
JSRPLIaiT63cyV1kvjMN1oAkCuc3Am5albC13mOAryEF3UB2ROrc1BwdBMC+aQ/z
BLNrxEeT7M1YiE1cFnmZZdb0X6pz2UWsiBgmproRriAOzsMW3fToJxcMykBzg/f5
6QCgoCbJ6Fv0UC1yDulnujxFXRrBPH7PCxeRVLi3cH0sXCBZbHRMRJDhyFn137Br
qKiP+UTPNgrj8dc3UGi13RNApHxYBcBO05JFSh0KrFlJFBd0jITLa4LGGUC08RDT
07Q0TWxhZGVuIFR1cmsgKERlZmF1bHQgc2lnbmluZyBrZXkpIDxtdHVya0BhcGFj
aGUub3JnPoh6BBMRCAAiBQJQ87AUAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
gAAKCRA1zSPBDUmOIziZAQCZD/YvZ1vrxmwAgDeJoMajmvHpWJPECkUzF0GFLW99
CwEAs0ZZKpwqQEEewdGocKld7hEvlbmvqllrCNJDkeDdJPa5BA0EUPOwMxAQAL6j
2zs8UQCVhPxf/RO0PhLqTPk8/6NW/W9uN1QjxPtdFaDmIpkIdY6RI3bo9bRlKf/F
vWWQfteUDhRiWosE/ERDrLDoFzSAKIEE3/rm1jYTVuWbfYnBA+zHbZmN0KgV8fbh
cLxt5qX+YTIp9mg2rXawCc5j2vQvPmCce/JkaR8k4ZF9XhWIrpH/afH1LE3ExePK
019Zo9thP9dw+IiJGWmL5v3JCiJDNmmJwqSKtBDMRX/9ygIZUWABAmvPzsr+fkee
FyPaezwtj1Qx96U+gZJiYO+eW8f2d3PrK2hC9yc8vD+N6w/ZdD4UIMBz/sSgmcD7
WRVs+j1KpEzIMVwxJY2V2bcuqDRKdPrhOO4zen26wutKRzZF5SRx8ruRE/Hbxmqh
H2teUtN+3xR0ARkbVDrTJwG8rvsUex5pzQk/z4V2s1Dm8ihirEuDFYE5B7Hpht8U
17JhVH6wIrBvwMNfd+Ac1mlfvBZ19JGOnjCwkR9o44N5lx0BSSndJVnrjitV//Zf
irASTVc/GEw5150kkZRCkaW3Hn5KMysGNXxgFf6aBbgVBlR56mNHT+6qbZV3Owbh
i5hSSKqxXMPsv3XEANg0isdLiv3E4/KxozChph+93EWuZwdrD0PbBccyJlUCywaj
pMBaKXzRDsuZOImi3ujcZbqPb0bZW1eZRpQ3LePrAAMGEAC5V1gmisUffyR5I3kk
HBcEkKW4fCQFZ/FLB6cQi4t9sunOYPT56klokhSIE0AJq/ndkOLz9eW2+D4RK3aj
IBtFTtBnXzn6nGbg+G9cpwPCpcWyuAMsiPwcFItH7mbcD9h/TCXJE+ILyhXaocOb
n9D9IsQ16WAIIQQsBbGYMvaemJv4xsZQrLhCHr/ofHye5huEBn/wwyBKnTCLd+P0
AkF+whf4Vl3yF4W3vnrYRFjU0XEXnVQ/nmiQH3cM0JxkVy46H3Zoe68Sjt49ZJt9
eEWH4M7KyJc86DWjRl/YMNdHE9SMx0ReKJTTNATfzgWIMvH+xUsD9K85Evm70jxc
13XziHwL0BjtMQzml19f/TDCUeLE9FiO5fyDgc6ueehsCxoKCvG8acQz25rkAJBv
i0WqdFSJG4rrJaLEwbSDkAkpY9yVk73acamwa42/E4G7v7sKuGVHzW5xBX8ac7lz
3CqKw771vWGZPgd8v2FIkk5ShikVyKQxnVADVACy2eqL8A8fmQMRSc/FYVMHfo0O
MD5jeWWAIPo3g8bguqwqyTC0DQo60Y38t4lyXxAvg5oWvwzKdrWKwm/WmQJaJuk6
TufoONXlsl0cc4LLHZESIwLRSP5YfxV9chplmA92vhekV0f2IchmJky/a25KEIRH
OdCCQTyOitoKXYy2swx9j69Q7YhhBBgRCAAJBQJQ87AzAhsMAAoJEDXNI8ENSY4j
plIA/R4QYFbde0Jw11KjqAr1AkQHaume7p5mv7Vt6I/D2CkUAP9i2PGC8mgArtlP
XDH35tl64G5lNKNum0D8NSGV955R2g==
=gxY8
-----END PGP PUBLIC KEY BLOCK-----
pub 2048R/A7A0233C 2012-02-25 [expires: 2016-02-25]
Key fingerprint = 8B46 CA49 EF48 37B8 C7F2 92DA A54A D08E A7A0 233C
uid Jeremy Boynes <[email protected]>
sig 3 A7A0233C 2012-02-25 Jeremy Boynes <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - https://gpgtools.org
mQENBE9JG+EBCADd5EaN9x1+10sWkZLbb/GL2VBkG3IDHxGvr44lo02pWLeREWCq
CUcx+gJrINyj2eWVYa1NGOfUZhDHJ+5mqbJ/FgN8pxXsD6n3naX+WmwR3klw5yIH
Ypkw7XsEP1TRFw/0P7rMGPWTgaDsS0LxNrhzDbdUj4H5lL8YFZcPfTSXapS6r/XK
6q4ceVhHvSrQtC9bOkb8EBqadRav1a45eQzqmbhZ3GaS+vXeGWIlfNGpNzxDr6wb
FjhazhiVYe3bBxQltjmSKct6zNg1f0fUdcAbxXMzfNRVYmApyqy0Aw7vGspRLipZ
hOi+TBeopNHiEtwSxahs8bcZmYlEw75VQ89HABEBAAG0IkplcmVteSBCb3luZXMg
PGpib3luZXNAYXBhY2hlLm9yZz6JAT4EEwECACgFAk9JG+ECGy8FCQeGH4AGCwkI
BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEKVK0I6noCM8r14IAMPbhDJns1hVgjCs
OFKPtvXiwFmH7IzPLCeEHDrUrkaY+akWYqBsnTsOw97pUC4Lq/ft9e+NnCX1UGg8
W+g8Ml38gN6ifYS4pTp7E67oz+eQTMbyKjtAXH3slN9Pwl4gSgO2jdsHtjjxQZS6
Vg+gVrG6piTmK7onDye89PFiMk07wXq6CQ/+zLyoXdpi1D86l1VMB2Sx+FNZ+z05
oVxU8tJXyIWrEazPIMDfzWwzyW1qsEzo8Ze4g8fLgCtiPJhSpFaPId12+AkUbk4+
QCuUl/v3Zly66jThcNS/U6S9VXBtQRxDZtkL8pSzmJxaFvvnZgkQ/hlvJ8f9ccS7
2/KQU94=
=yvcP
-----END PGP PUBLIC KEY BLOCK-----
pub rsa4096 2018-10-20 [SC]
7659 0809 9ACF 9270 2C7D 949B FA0C 35EA 8AA2 99F1
uid Konstantin Kolinko (CODE SIGNING KEY) <[email protected]>
sig 3 FA0C35EA8AA299F1 2018-10-20 Konstantin Kolinko (CODE SIGNING KEY) <[email protected]>
sub rsa4096 2018-10-20 [E]
sig FA0C35EA8AA299F1 2018-10-20 Konstantin Kolinko (CODE SIGNING KEY) <[email protected]>
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFvK5u8BEADAYQQ4aUftuWr+CuHgL1iY7i8LqMomEdfyoDAmPPcMQ0Th6r4a
p/Oq/9OuCAXOfX2ev9FVj9oHynkOUDqRlHfplkquacuQtlhZzFSlkO8Jyk6AcbK0
dbGMOyiPnOS/+odt2Nxht9ksQvXn61IsQ9YtRZ7GEngaYmVfnZCYeDGy6sghYFrO
laG8n7MfQaqaVZUVSagMgiHxmtn4Ai8EN7z2MGv/pi4xX6QkfPiTtxoj56DN5Ax/
rTwyFVgr4mUa2FSn8ytclWXKMjcAIX42UIQ5vtELHMZl6DI2SLxaHQm8JgQ39SFc
aE4ukji145Srjl2qSiUxr6SJaDi1V5wONCcBkOkoS1M0tdbncpaa89mwrberIrU+
NoFZvc7YPLCUFBW+cyG3gcAegiRRwwwGd+ETnKEd+i7bNnMbBXtMxox11w2imBz/
TV13PvaEH5Sp+4PTJ6/7pMORPGjhKjmojXtz5joJSx26CRPfeXxPdB3N0p6jL5tU
IVNNUhpBvuADQur3FTYxv1mN5h4C6y1nw/HplWyLmo7tjPDgfShv3Cst4G+UHYLf
15NUO77YhyYKv9RkFBARLTMt3gcxukyNFqaNYoLtTpo2daOvbdKeAVr+TXMfiVOd
wccKAAieISjHIXI2zaLh7fpkHv6SZR5HxtloQkdcshDXd+H4aTCQS99b1QARAQAB
tDtLb25zdGFudGluIEtvbGlua28gKENPREUgU0lHTklORyBLRVkpIDxra29saW5r
b0BhcGFjaGUub3JnPokCTgQTAQgAOBYhBHZZCAmaz5JwLH2Um/oMNeqKopnxBQJb
yubvAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEPoMNeqKopnxYDsP/1yP
ViWfh2fUoadTFAIy1TMdJfOqwABPW+1AWACLEsF8dcfA/mRRjrTWhR4+RTyP9Thn
/qBGsO0oZZrxIXPdqnZq3Dt15StBLHJtexKll8BLRXp56uTV3BPFFiBYHGLvNivW
QwYBBhMhvcpG+xQdqwhyhfycdyfr75HQ24z+L2i7rrGsKvSWT1F9FSsfgk82fz7T
HXsMcmDiL7RzZX0vau7l1823ug+q0WLYLIMdbRu4XySTsgmz8cLImDrvOSTiccp3
hdJbulcoTtfCQOrQkFliUAZ1zBtBcNqyMANp2iwSj24MrI+ofs53PDfKLiqQLxrZ
7+X7pTapX5IZ4U4Bra9IcoaMYmNLsUUstZUviho57aWWf+H7n9x6+Ny5I6T6KB9b
W343z6E9LX601AJZnm+nVNoOW6oyfOBcMfEUF5WT2lqy5hRW+wXB3kzUvMMC0O1u
FAf/9dBbRrRbBCPeECw/OTlquvwe8t7v2FOyD/nVk/Ku50Pr6quf+zoJULXOM1IH
HzwvTxRblgMobtvU9seVJ455VCCXUkH91Tymt5bY1oXeHD5QR/DGv4ldL8J+IrC+
9oBbuifZvmO8VeoV4uckdFPkb7ZdjWMOAr87q0dkQsruWZve6aBEaofNyKkP2R7A
IvtkcBRvEQxgcn1XjV2R6vsLXnhj4h8VLrgL9hbjuQINBFvK5u8BEAC4T9N/Bueq
oJPLUulnzzSYFwV+09HHLNQIgcLdbbHT/YWoOt52UnotyiTRIEgKHdgHOt/JleDJ
WyIdJKXBjve+B4qH7QCJYys7TkG2Rp9cCp5DBiv646srTro07YxdjeQxEgeh5ISk
XzwaHtsAt3mlcpOhc1FFMKTK6OmPzyJDuwmh24VUKXwaF8lygJCTxohIxSrOJgFl
A4RmMKhlIDNN27PD4gXR35vx9KuT9xMRHYzaK0gG5sls/ECIdhVsYVKs9nk22KLb
W+ax1btHDBR4qCBqd6BLobtyZOGTDhOjo63PF6lBUiveud+wsQI6Il/7KxfFOyAM
K6DOSbnkesOwh5ZtrWDp+Fmm9IdkDizZ2wKnZ+MSW7yGVIuJe5F8OhOV1EJobJzi
w2ZVhE7JjwEJkJ1NVbkz3t3uRdQDbo4uA/rbGyaJvDvZuDudoqosAgmSX3AIlgDo
UgnUquvGvUA47f88oWnlUMWGf5BtfUwqmrsm5IAhOygwsReWvArdgeLg86CvtUIz
0lY0AA/Tms+Qq7z9M/yqMbS4KvdjUFIiJMc3qsa2QYTvsIRpaSa29M7p40OHFILy
CE830AlFodt4126Y5KzPv7W/kx5S2JEaL9/F6eunQXhCq7+qfgaiysK/BcF6iNkW
8MsYyUb/ssg5ZgRRQGjhYdUA03WJxObLWwARAQABiQI2BBgBCAAgFiEEdlkICZrP
knAsfZSb+gw16oqimfEFAlvK5u8CGwwACgkQ+gw16oqimfEyzhAAmGslS4w+oIe5
mV2rxTqhpr0/KUwtdapPSYWgx5yYjNN6kpu0Cm498GfVZvYaHHLKrX5JhC5EZlab
Bhuo0V1iA5tkjeh824Ty9XSOYG45B836mOVcXpCCPAu5i0JmsQCwvQWYyXuZbGLa
lQ9LBb2K3c6yBLcXgEHI3MCK/JmGjZo1QJiZYTuLTl8tEZchiwp9iB7fhcSatjGu
jJSbIb0JqU5c9GhVihq9tucLECJPSo8gC2GXOwqFs2Df4rcsK3Ua099aqj5q6Ugu
JODlWh4FIYV9YLKkoNCXCIe0geSWBvWD80ccMkSvAAcyy07dQzGw3bAj4DfGa21A
R/HpTEKqYMkovjOLuDptF8GL8+clXXnMzOswqsWdwQmw8dwk8mR4ZoYLSSVNwEzo
7LHTyXyJgc4K4UUPTj+nXFdUTDZLoELDc6ok1fcRIM8MalcSw7Jh3ZEJv5kY+Vxn
rmfUi0P3iaseYZCtykRaRssyFNknOYWIrTtKH9h2rF4oaLsWxLEosVgGZUsbPcTZ
uYw7knX6NkWTS9IRR3BpJ3tw0kk9DPHK3sNlumdMk0ylzkFbZc7JCQi325WrABsK
C6Wc1owhZdi9ysx7mshgK4gu7JIAk8ryyN9XbyNjIM6M9aMYxTwECnLQPI8sTALg
mSKqKZpUdvO77XQVYsjBAu3aMluPBNo=
=uK1p
-----END PGP PUBLIC KEY BLOCK-----
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
APACHE TOMCAT SUBCOMPONENTS:
Apache Tomcat includes a number of subcomponents with separate copyright notices
and license terms. Your use of these subcomponents is subject to the terms and
conditions of the following licenses.
For the Eclipse JDT Core Batch Compiler (ecj-x.x.x.jar) component:
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation
distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to
its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright
rights in its Contribution, if any, to grant the copyright license set forth in
this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by
that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor,
and informs licensees how to obtain it in a reasonable manner on or through a
medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the
Program.
Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not apply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor
to control, and cooperate with the Commercial Contributor in, the defense and
any related settlement negotiations. The Indemnified Contributor may
participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement , including but not limited to the risks and costs
of program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
(excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
may assign the responsibility to serve as the Agreement Steward to a suitable
separate entity. Each new version of the Agreement will be given a
distinguishing version number. The Program (including Contributions) may always
be distributed subject to the version of the Agreement under which it was
received. In addition, after a new version of the Agreement is published,
Contributor may elect to distribute the Program (including its Contributions)
under the new version. Except as expressly stated in Sections 2(a) and 2(b)
above, Recipient receives no rights or licenses to the intellectual property of
any Contributor under this Agreement, whether expressly, by implication,
estoppel or otherwise. All rights in the Program not expressly granted under
this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
For the Windows Installer component:
* All NSIS source code, plug-ins, documentation, examples, header files and
graphics, with the exception of the compression modules and where
otherwise noted, are licensed under the zlib/libpng license.
* The zlib compression module for NSIS is licensed under the zlib/libpng
license.
* The bzip2 compression module for NSIS is licensed under the bzip2 license.
* The lzma compression module for NSIS is licensed under the Common Public
License version 1.0.
zlib/libpng license
This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use of
this software.
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to
the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
bzip2 license
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.
3. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
4. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
Julian Seward, Cambridge, UK.
[email protected]
Common Public License version 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation
distributed under this Agreement, and b) in the case of each subsequent
Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to
its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright
rights in its Contribution, if any, to grant the copyright license set forth in
this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by
that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor,
and informs licensees how to obtain it in a reasonable manner on or through a
medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the
Program.
Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not apply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipient receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
Special exception for LZMA compression module
Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for
NSIS, expressly permit you to statically or dynamically link your code (or bind
by name) to the files from the LZMA compression module for NSIS without
subjecting your linked code to the terms of the Common Public license version
1.0. Any modifications or additions to files from the LZMA compression module
for NSIS, however, are subject to the terms of the Common Public License version
1.0.
For the following XML Schemas for Java EE Deployment Descriptors:
- javaee_5.xsd
- javaee_web_services_1_2.xsd
- javaee_web_services_client_1_2.xsd
- javaee_6.xsd
- javaee_web_services_1_3.xsd
- javaee_web_services_client_1_3.xsd
- jsp_2_2.xsd
- web-app_3_0.xsd
- web-common_3_0.xsd
- web-fragment_3_0.xsd
- javaee_7.xsd
- javaee_web_services_1_4.xsd
- javaee_web_services_client_1_4.xsd
- jsp_2_3.xsd
- web-app_3_1.xsd
- web-common_3_1.xsd
- web-fragment_3_1.xsd
- javaee_8.xsd
- web-app_4_0.xsd
- web-common_4_0.xsd
- web-fragment_4_0.xsd
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
1. Definitions.
1.1. Contributor. means each individual or entity that creates or contributes
to the creation of Modifications.
1.2. Contributor Version. means the combination of the Original Software,
prior Modifications used by a Contributor (if any), and the
Modifications made by that particular Contributor.
1.3. Covered Software. means (a) the Original Software, or (b) Modifications,
or (c) the combination of files containing Original Software with files
containing Modifications, in each case including portions thereof.
1.4. Executable. means the Covered Software in any form other than Source
Code.
1.5. Initial Developer. means the individual or entity that first makes
Original Software available under this License.
1.6. Larger Work. means a work which combines Covered Software or portions
thereof with code not governed by the terms of this License.
1.7. License. means this document.
1.8. Licensable. means having the right to grant, to the maximum extent
possible, whether at the time of the initial grant or subsequently
acquired, any and all of the rights conveyed herein.
1.9. Modifications. means the Source Code and Executable form of any of the
following:
A. Any file that results from an addition to, deletion from or
modification of the contents of a file containing Original Software
or previous Modifications;
B. Any new file that contains any part of the Original Software or
previous Modification; or
C. Any new file that is contributed or otherwise made available under
the terms of this License.
1.10. Original Software. means the Source Code and Executable form of
computer software code that is originally released under this License.
1.11. Patent Claims. means any patent claim(s), now owned or hereafter
acquired, including without limitation, method, process, and apparatus
claims, in any patent Licensable by grantor.
1.12. Source Code. means (a) the common form of computer software code in
which modifications are made and (b) associated documentation included
in or with such code.
1.13. You. (or .Your.) means an individual or a legal entity exercising
rights under, and complying with all of the terms of, this License. For
legal entities, .You. includes any entity which controls, is controlled
by, or is under common control with You. For purposes of this
definition, .control. means (a) the power, direct or indirect, to cause
the direction or management of such entity, whether by contract or
otherwise, or (b) ownership of more than fifty percent (50%) of the
outstanding shares or beneficial ownership of such entity.
2. License Grants.
2.1. The Initial Developer Grant.
Conditioned upon Your compliance with Section 3.1 below and subject to
third party intellectual property claims, the Initial Developer hereby
grants You a world-wide, royalty-free, non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by Initial Developer, to use, reproduce, modify, display,
perform, sublicense and distribute the Original Software (or
portions thereof), with or without Modifications, and/or as part of
a Larger Work; and
(b) under Patent Claims infringed by the making, using or selling of
Original Software, to make, have made, use, practice, sell, and
offer for sale, and/or otherwise dispose of the Original Software
(or portions thereof).
(c) The licenses granted in Sections 2.1(a) and (b) are effective on the
date Initial Developer first distributes or otherwise makes the
Original Software available to a third party under the terms of this
License.
(d) Notwithstanding Section 2.1(b) above, no patent license is granted:
(1) for code that You delete from the Original Software, or (2) for
infringements caused by: (i) the modification of the Original
Software, or (ii) the combination of the Original Software with
other software or devices.
2.2. Contributor Grant.
Conditioned upon Your compliance with Section 3.1 below and subject to third
party intellectual property claims, each Contributor hereby grants You a
world-wide, royalty-free, non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by Contributor to use, reproduce, modify, display,
perform, sublicense and distribute the Modifications created by such
Contributor (or portions thereof), either on an unmodified basis,
with other Modifications, as Covered Software and/or as part of a
Larger Work; and
(b) under Patent Claims infringed by the making, using, or selling of
Modifications made by that Contributor either alone and/or in
combination with its Contributor Version (or portions of such
combination), to make, use, sell, offer for sale, have made, and/or
otherwise dispose of: (1) Modifications made by that Contributor (or
portions thereof); and (2) the combination of Modifications made by
that Contributor with its Contributor Version (or portions of such
combination).
(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
the date Contributor first distributes or otherwise makes the
Modifications available to a third party.
(d) Notwithstanding Section 2.2(b) above, no patent license is granted:
(1) for any code that Contributor has deleted from the Contributor
Version; (2) for infringements caused by: (i) third party
modifications of Contributor Version, or (ii) the combination of
Modifications made by that Contributor with other software (except
as part of the Contributor Version) or other devices; or (3) under
Patent Claims infringed by Covered Software in the absence of
Modifications made by that Contributor.
3. Distribution Obligations.
3.1. Availability of Source Code.
Any Covered Software that You distribute or otherwise make available in
Executable form must also be made available in Source Code form and that
Source Code form must be distributed only under the terms of this License.
You must include a copy of this License with every copy of the Source Code
form of the Covered Software You distribute or otherwise make available.
You must inform recipients of any such Covered Software in Executable form
as to how they can obtain such Covered Software in Source Code form in a
reasonable manner on or through a medium customarily used for software
exchange.
3.2. Modifications.
The Modifications that You create or to which You contribute are governed
by the terms of this License. You represent that You believe Your
Modifications are Your original creation(s) and/or You have sufficient
rights to grant the rights conveyed by this License.
3.3. Required Notices.
You must include a notice in each of Your Modifications that identifies
You as the Contributor of the Modification. You may not remove or alter
any copyright, patent or trademark notices contained within the Covered
Software, or any notices of licensing or any descriptive text giving
attribution to any Contributor or the Initial Developer.
3.4. Application of Additional Terms.
You may not offer or impose any terms on any Covered Software in Source
Code form that alters or restricts the applicable version of this License
or the recipients. rights hereunder. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability obligations to
one or more recipients of Covered Software. However, you may do so only on
Your own behalf, and not on behalf of the Initial Developer or any
Contributor. You must make it absolutely clear that any such warranty,
support, indemnity or liability obligation is offered by You alone, and
You hereby agree to indemnify the Initial Developer and every Contributor
for any liability incurred by the Initial Developer or such Contributor as
a result of warranty, support, indemnity or liability terms You offer.
3.5. Distribution of Executable Versions.
You may distribute the Executable form of the Covered Software under the
terms of this License or under the terms of a license of Your choice,
which may contain terms different from this License, provided that You are
in compliance with the terms of this License and that the license for the
Executable form does not attempt to limit or alter the recipient.s rights
in the Source Code form from the rights set forth in this License. If You
distribute the Covered Software in Executable form under a different
license, You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial Developer
or Contributor. You hereby agree to indemnify the Initial Developer and
every Contributor for any liability incurred by the Initial Developer or
such Contributor as a result of any such terms You offer.
3.6. Larger Works.
You may create a Larger Work by combining Covered Software with other code
not governed by the terms of this License and distribute the Larger Work
as a single product. In such a case, You must make sure the requirements
of this License are fulfilled for the Covered Software.
4. Versions of the License.
4.1. New Versions.
Sun Microsystems, Inc. is the initial license steward and may publish
revised and/or new versions of this License from time to time. Each
version will be given a distinguishing version number. Except as provided
in Section 4.3, no one other than the license steward has the right to
modify this License.
4.2. Effect of New Versions.
You may always continue to use, distribute or otherwise make the Covered
Software available under the terms of the version of the License under
which You originally received the Covered Software. If the Initial
Developer includes a notice in the Original Software prohibiting it from
being distributed or otherwise made available under any subsequent version
of the License, You must distribute and make the Covered Software
available under the terms of the version of the License under which You
originally received the Covered Software. Otherwise, You may also choose
to use, distribute or otherwise make the Covered Software available under
the terms of any subsequent version of the License published by the
license steward.
4.3. Modified Versions.
When You are an Initial Developer and You want to create a new license for
Your Original Software, You may create and use a modified version of this
License if You: (a) rename the license and remove any references to the
name of the license steward (except to note that the license differs from
this License); and (b) otherwise make it clear that the license contains
terms which differ from this License.
5. DISCLAIMER OF WARRANTY.
COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD
ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL
DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED
HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
6. TERMINATION.
6.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to
cure such breach within 30 days of becoming aware of the breach.
Provisions which, by their nature, must remain in effect beyond the
termination of this License shall survive.
6.2. If You assert a patent infringement claim (excluding declaratory
judgment actions) against Initial Developer or a Contributor (the
Initial Developer or Contributor against whom You assert such claim
is referred to as .Participant.) alleging that the Participant
Software (meaning the Contributor Version where the Participant is a
Contributor or the Original Software where the Participant is the
Initial Developer) directly or indirectly infringes any patent, then
any and all rights granted directly or indirectly to You by such
Participant, the Initial Developer (if the Initial Developer is not
the Participant) and all Contributors under Sections 2.1 and/or 2.2
of this License shall, upon 60 days notice from Participant terminate
prospectively and automatically at the expiration of such 60 day
notice period, unless if within such 60 day period You withdraw Your
claim with respect to the Participant Software against such
Participant either unilaterally or pursuant to a written agreement
with Participant.
6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
user licenses that have been validly granted by You or any
distributor hereunder prior to termination (excluding licenses
granted to You by any distributor) shall survive termination.
7. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF
ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR
DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT
APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
8. U.S. GOVERNMENT END USERS.
The Covered Software is a .commercial item,. as that term is defined in 48
C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as
that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and commercial
computer software documentation. as such terms are used in 48 C.F.R. 12.212
(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered
Software with only those rights set forth herein. This U.S. Government Rights
clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or
provision that addresses Government rights in computer software under this
License.
9. MISCELLANEOUS.
This License represents the complete agreement concerning subject matter
hereof. If any provision of this License is held to be unenforceable, such
provision shall be reformed only to the extent necessary to make it
enforceable. This License shall be governed by the law of the jurisdiction
specified in a notice contained within the Original Software (except to the
extent applicable law, if any, provides otherwise), excluding such
jurisdiction's conflict-of-law provisions. Any litigation relating to this
License shall be subject to the jurisdiction of the courts located in the
jurisdiction and venue specified in a notice contained within the Original
Software, with the losing party responsible for costs, including, without
limitation, court costs and reasonable attorneys. fees and expenses. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded. Any law or regulation
which provides that the language of a contract shall be construed against
the drafter shall not apply to this License. You agree that You alone are
responsible for compliance with the United States export administration
regulations (and the export control laws and regulation of any other
countries) when You use, distribute or otherwise make available any Covered
Software.
10. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is responsible
for claims and damages arising, directly or indirectly, out of its
utilization of rights under this License and You agree to work with Initial
Developer and Contributors to distribute such responsibility on an equitable
basis. Nothing herein is intended or shall be deemed to constitute any
admission of liability.
NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
LICENSE (CDDL)
The code released under the CDDL shall be governed by the laws of the State
of California (excluding conflict-of-law provisions). Any litigation relating
to this License shall be subject to the jurisdiction of the Federal Courts of
the Northern District of California and the state courts of the State of
California, with venue lying in Santa Clara County, California.
================================================================================
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.
================================================================================
Apache Tomcat re-uses code from a number of other Apache projects. There are
several reasons why depending on the binary releases of those projects is not
ideal. These include:
- potential conflicts if a web application ships with the same JAR
- a large JAR where Tomcat only depends on a small fraction
GIT
===
Updates from Git are applied manually via patch files. Patch files are generated
using:
git diff <last SHA1>:<sub-tree> HEAD:<sub-tree> > temp.patch
The most recently merged SHA1 for the component below should be updated after
the patch file has been applied and committed
BCEL
----
Sub-tree:
src/main/java/org/apache/bcel
The SHA1 ID for the most recent commit to be merged to Tomcat is:
ff6941e4491c68f6eaf270ff03c1bc1e554c7b42 (2019-12-06)
Codec
-----
Sub-tree:
src/main/java/org/apache/commons/codec
The SHA1 ID for the most recent commit to be merged to Tomcat is:
9637dd44fa0e2d5a6ddb45791e3cd78298842d95 (2019-12-06)
Note: Only classes required for Base64 encoding/decoding. The rest are removed.
FileUpload
----------
Sub-tree:
src/main/java/org/apache/commons/fileupload2
The SHA1 ID for the most recent commit to be merged to Tomcat is:
2317552993fd5180a84083d599b8cbdb05a07bab (2019-12-06)
Note: Tomcat's copy of fileupload also includes classes copied manually from
Commons IO.
DBCP
----
Pool2
Sub-tree
src/main/java/org/apache/commons/pool2
The SHA1 ID for the most recent commit to be merged to Tomcat is:
6092f924b36061353ff92b18c88400ab3bc05327 (2019-12-06)
DBCP2
Sub-tree
src/main/java/org/apache/commons/dbcp2
src/main/resources/org/apache/commons/dbcp2
The SHA1 ID for the most recent commit to be merged to Tomcat is:
a363906bf7a039f79c07fa3c68b082a69ae035d7 (2019-12-06)
Apache Tomcat
Copyright 1999-2020 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
This software contains code derived from netty-native
developed by the Netty project
(https://netty.io, https://github.com/netty/netty-tcnative/)
and from finagle-native developed at Twitter
(https://github.com/twitter/finagle).
This software contains code derived from jgroups-kubernetes
developed by the JGroups project (http://www.jgroups.org/).
The Windows Installer is built with the Nullsoft
Scriptable Install System (NSIS), which is
open source software. The original software and
related information is available at
http://nsis.sourceforge.net.
Java compilation software for JSP pages is provided by the Eclipse
JDT Core Batch Compiler component, which is open source software.
The original software and related information is available at
https://www.eclipse.org/jdt/core/.
org.apache.tomcat.util.json.JSONParser.jj is a public domain javacc grammar
for JSON written by Robert Fischer.
https://github.com/RobertFischer/json-parser
For portions of the Tomcat JNI OpenSSL API and the OpenSSL JSSE integration
The org.apache.tomcat.jni and the org.apache.tomcat.net.openssl packages
are derivative work originating from the Netty project and the finagle-native
project developed at Twitter
* Copyright 2014 The Netty Project
* Copyright 2014 Twitter
For portions of the Tomcat cloud support
The org.apache.catalina.tribes.membership.cloud package contains derivative
work originating from the jgroups project.
https://github.com/jgroups-extras/jgroups-kubernetes
Copyright 2002-2018 Red Hat Inc.
The original XML Schemas for Java EE Deployment Descriptors:
- javaee_5.xsd
- javaee_web_services_1_2.xsd
- javaee_web_services_client_1_2.xsd
- javaee_6.xsd
- javaee_web_services_1_3.xsd
- javaee_web_services_client_1_3.xsd
- jsp_2_2.xsd
- web-app_3_0.xsd
- web-common_3_0.xsd
- web-fragment_3_0.xsd
- javaee_7.xsd
- javaee_web_services_1_4.xsd
- javaee_web_services_client_1_4.xsd
- jsp_2_3.xsd
- web-app_3_1.xsd
- web-common_3_1.xsd
- web-fragment_3_1.xsd
- javaee_8.xsd
- web-app_4_0.xsd
- web-common_4_0.xsd
- web-fragment_4_0.xsd
may be obtained from:
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html

Welcome to Apache Tomcat!

What Is It?

The Apache Tomcat® software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. The Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket specifications are developed under the Java Community Process.

The Apache Tomcat software is developed in an open and participatory environment and released under the Apache License version 2. The Apache Tomcat project is intended to be a collaboration of the best-of-breed developers from around the world. We invite you to participate in this open development project. To learn more about getting involved, click here or keep reading.

Apache Tomcat software powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations. Some of these users and their stories are listed on the PoweredBy wiki page.

Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat project logo are trademarks of the Apache Software Foundation.

Get It

For every major Tomcat version there is one download page containing links to the latest binary and source code downloads, but also links for browsing the download directories and archives:

To facilitate choosing the right major Tomcat version one, we have provided a version overview page.

Documentation

The documentation available as of the date of this release is included in the docs webapp which ships with tomcat. You can access that webapp by starting tomcat and visiting http://localhost:8080/docs/ in your browser. The most up-to-date documentation for each version can be found at:

Installation

Please see RUNNING.txt for more info.

Licensing

Please see LICENSE for more info.

Support and Mailing List Information

  • Free community support is available through the tomcat-users email list and a dedicated IRC channel (#tomcat on Freenode).

  • If you want freely available support for running Apache Tomcat, please see the resources page here.

  • If you want to be informed about new code releases, bug fixes, security fixes, general news and information about Apache Tomcat, please subscribe to the tomcat-announce email list.

  • If you have a concrete bug report for Apache Tomcat, please see the instructions for reporting a bug here.

Contributing

Please see CONTRIBUTING for more info.

================================================================================
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.
================================================================================
Apache Tomcat Version @VERSION@
Release Notes
=========
CONTENTS:
=========
* Dependency Changes
* API Stability
* Bundled APIs
* Web application reloading and static fields in shared libraries
* Security manager URLs
* Symlinking static resources
* Viewing the Tomcat Change Log
* Cryptographic software notice
* When all else fails
===================
Dependency Changes:
===================
Tomcat @VERSION_MAJOR_MINOR@ is designed to run on Java @MIN_JAVA_VERSION@ and later.
==============
API Stability:
==============
The following notes on API stability only applies once Tomcat 10.0.x has had its
first stable release.
The public interfaces for the following classes are fixed and will not be
changed at all during the remaining lifetime of the @[email protected] series:
- All classes in the jakarta namespace
The public interfaces for the following classes may be added to in order to
resolve bugs and/or add new features. No existing interface method will be
removed or changed although it may be deprecated.
- org.apache.catalina.* (excluding sub-packages)
Note: As Tomcat @VERSION_MAJOR@ matures, the above list will be added to. The list is not
considered complete at this time.
The remaining classes are considered part of the Tomcat internals and may change
without notice between point releases.
=============
Bundled APIs:
=============
A standard installation of Tomcat @VERSION_MAJOR_MINOR@ makes all of the following APIs available
for use by web applications (by placing them in "lib"):
* annotations-api.jar (Annotations package)
* catalina.jar (Tomcat Catalina implementation)
* catalina-ant.jar (Tomcat Catalina Ant tasks)
* catalina-ha.jar (High availability package)
* catalina-ssi.jar (Server-side Includes module)
* catalina-storeconfig.jar (Generation of XML configuration from current state)
* catalina-tribes.jar (Group communication)
* ecj-@[email protected] (Eclipse JDT Java compiler)
* el-api.jar (EL 4.0 API)
* jasper.jar (Jasper 2 Compiler and Runtime)
* jasper-el.jar (Jasper 2 EL implementation)
* jsp-api.jar (JSP 3.0 API)
* servlet-api.jar (Servlet 5.0 API)
* tomcat-api.jar (Interfaces shared by Catalina and Jasper)
* tomcat-coyote.jar (Tomcat connectors and utility classes)
* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP 2)
* tomcat-jdbc.jar (Tomcat's database connection pooling solution)
* tomcat-jni.jar (Interface to the native component of the APR/native connector)
* tomcat-util.jar (Various utilities)
* tomcat-websocket.jar (WebSocket 2.0 implementation)
* websocket-api.jar (WebSocket 2.0 API)
You can make additional APIs available to all of your web applications by
putting unpacked classes into a "classes" directory (not created by default),
or by placing them in JAR files in the "lib" directory.
To override the XML parser implementation or interfaces, use the appropriate
feature for your JVM. For Java <= 8 use the endorsed standards override
feature. The default configuration defines JARs located in "endorsed" as endorsed.
For Java 9+ use the upgradeable modules feature.
================================================================
Web application reloading and static fields in shared libraries:
================================================================
Some shared libraries (many are part of the JDK) keep references to objects
instantiated by the web application. To avoid class loading related problems
(ClassCastExceptions, messages indicating that the classloader
is stopped, etc.), the shared libraries state should be reinitialized.
Something which might help is to avoid putting classes which would be
referenced by a shared static field in the web application classloader,
and putting them in the shared classloader instead (JARs should be put in the
"lib" folder, and classes should be put in the "classes" folder).
======================
Security manager URLs:
======================
In order to grant security permissions to JARs located inside the
web application repository, use URLs of the following format
in your policy file:
file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar
============================
Symlinking static resources:
============================
By default, Unix symlinks will not work when used in a web application to link
resources located outside the web application root directory.
This behavior is optional, and the "allowLinking" flag may be used to disable
the check.
==============================
Viewing the Tomcat Change Log:
==============================
The full change log is available from https://tomcat.apache.org and is also
included in the documentation web application.
=============================
Cryptographic software notice
=============================
This distribution includes cryptographic software. The country in
which you currently reside may have restrictions on the import,
possession, use, and/or re-export to another country, of
encryption software. BEFORE using any encryption software, please
check your country's laws, regulations and policies concerning the
import, possession, or use, and re-export of encryption software, to
see if this is permitted. See <http://www.wassenaar.org/> for more
information.
The U.S. Government Department of Commerce, Bureau of Industry and
Security (BIS), has classified this software as Export Commodity
Control Number (ECCN) 5D002.C.1, which includes information security
software using or performing cryptographic functions with asymmetric
algorithms. The form and manner of this Apache Software Foundation
distribution makes it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception (see the BIS
Export Administration Regulations, Section 740.13) for both object
code and source code.
The following provides more details on the included cryptographic
software:
- Tomcat includes code designed to work with JSSE
- Tomcat includes code designed to work with OpenSSL
====================
When all else fails:
====================
See the FAQ
https://tomcat.apache.org/faq/
================================================================================
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.
================================================================================
===================================================
Running The Apache Tomcat @VERSION_MAJOR_MINOR@ Servlet/JSP Container
===================================================
Apache Tomcat @VERSION_MAJOR_MINOR@ requires a Java Standard Edition Runtime
Environment (JRE) version 8 or later.
=============================
Running With JRE 8 Or Later
=============================
(1) Download and Install a Java SE Runtime Environment (JRE)
(1.1) Download a Java SE Runtime Environment (JRE),
release version 8 or later, from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
(1.2) Install the JRE according to the instructions included with the
release.
You may also use a full Java Development Kit (JDK) rather than just
a JRE.
(2) Download and Install Apache Tomcat
(2.1) Download a binary distribution of Tomcat from:
https://tomcat.apache.org/
(2.2) Unpack the binary distribution so that it resides in its own
directory (conventionally named "apache-tomcat-[version]").
For the purposes of the remainder of this document, the name
"CATALINA_HOME" is used to refer to the full pathname of that
directory.
NOTE: As an alternative to downloading a binary distribution, you can
create your own from the Tomcat source code, as described in
"BUILDING.txt". You can either
a) Do the full "release" build and find the created distribution in the
"output/release" directory and then proceed with unpacking as above, or
b) Do a simple build and use the "output/build" directory as
"CATALINA_HOME". Be warned that there are some differences between the
contents of the "output/build" directory and a full "release"
distribution.
(3) Configure Environment Variables
Tomcat is a Java application and does not use environment variables directly.
Environment variables are used by the Tomcat startup scripts. The scripts use
the environment variables to prepare the command that starts Tomcat.
(3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional)
The CATALINA_HOME environment variable should be set to the location of the
root directory of the "binary" distribution of Tomcat.
The Tomcat startup scripts have some logic to set this variable
automatically if it is absent, based on the location of the startup script
in *nix and on the current directory in Windows. That logic might not work
in all circumstances, so setting the variable explicitly is recommended.
The CATALINA_BASE environment variable specifies location of the root
directory of the "active configuration" of Tomcat. It is optional. It
defaults to be equal to CATALINA_HOME.
Using distinct values for the CATALINA_HOME and CATALINA_BASE variables is
recommended to simplify further upgrades and maintenance. It is documented
in the "Multiple Tomcat Instances" section below.
(3.2) Set JRE_HOME or JAVA_HOME (required)
These variables are used to specify location of a Java Runtime
Environment or of a Java Development Kit that is used to start Tomcat.
The JRE_HOME variable is used to specify location of a JRE. The JAVA_HOME
variable is used to specify location of a JDK.
Using JAVA_HOME provides access to certain additional startup options that
are not allowed when JRE_HOME is used.
If both JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.
The recommended place to specify these variables is a "setenv" script. See
below.
(3.3) Other variables (optional)
Other environment variables exist, besides the four described above.
See the comments at the top of catalina.bat or catalina.sh scripts for
the list and a description of each of them.
One frequently used variable is CATALINA_OPTS. It allows specification of
additional options for the java command that starts Tomcat.
See the Java documentation for the options that affect the Java Runtime
Environment.
See the "System Properties" page in the Tomcat Configuration Reference for
the system properties that are specific to Tomcat.
A similar variable is JAVA_OPTS. It is used less frequently. It allows
specification of options that are used both to start and to stop Tomcat as well
as for other commands.
Note: Do not use JAVA_OPTS to specify memory limits. You do not need much
memory for a small process that is used to stop Tomcat. Those settings
belong to CATALINA_OPTS.
Another frequently used variable is CATALINA_PID (on *nix only). It
specifies the location of the file where process id of the forked Tomcat
java process will be written. This setting is optional. It will enable the
following features:
* better protection against duplicate start attempts and
* allows forceful termination of Tomcat process when it does not react to
the standard shutdown command.
(3.4) Using the "setenv" script (optional, recommended)
Apart from CATALINA_HOME and CATALINA_BASE, all environment variables can
be specified in the "setenv" script. The script is placed either into
CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named
setenv.bat (on Windows) or setenv.sh (on *nix). The file has to be
readable.
By default the setenv script file is absent. If the script file is present
both in CATALINA_BASE and in CATALINA_HOME, the one in CATALINA_BASE is
preferred.
For example, to configure the JRE_HOME and CATALINA_PID variables you can
create the following script file:
On Windows, %CATALINA_BASE%\bin\setenv.bat:
set "JRE_HOME=%ProgramFiles%\Java\jre@MIN_JAVA_VERSION@"
exit /b 0
On *nix, $CATALINA_BASE/bin/setenv.sh:
JRE_HOME=/usr/java/latest
CATALINA_PID="$CATALINA_BASE/tomcat.pid"
The CATALINA_HOME and CATALINA_BASE variables cannot be configured in the
setenv script, because they are used to locate that file.
All the environment variables described here and the "setenv" script are
used only if you use the standard scripts to launch Tomcat. For example, if
you have installed Tomcat as a service on Windows, the service wrapper
launches Java directly and does not use the script files.
(4) Start Up Tomcat
(4.1) Tomcat can be started by executing one of the following commands:
On Windows:
%CATALINA_HOME%\bin\startup.bat
or
%CATALINA_HOME%\bin\catalina.bat start
On *nix:
$CATALINA_HOME/bin/startup.sh
or
$CATALINA_HOME/bin/catalina.sh start
(4.2) After startup, the default web applications included with Tomcat will be
available by visiting:
http://localhost:8080/
(4.3) Further information about configuring and running Tomcat can be found in
the documentation included here, as well as on the Tomcat web site:
https://tomcat.apache.org/
(5) Shut Down Tomcat
(5.1) Tomcat can be shut down by executing one of the following commands:
On Windows:
%CATALINA_HOME%\bin\shutdown.bat
or
%CATALINA_HOME%\bin\catalina.bat stop
On *nix:
$CATALINA_HOME/bin/shutdown.sh
or
$CATALINA_HOME/bin/catalina.sh stop
==================================================
Advanced Configuration - Multiple Tomcat Instances
==================================================
In many circumstances, it is desirable to have a single copy of a Tomcat
binary distribution shared among multiple users on the same server. To make
this possible, you can set the CATALINA_BASE environment variable to the
directory that contains the files for your 'personal' Tomcat instance.
When running with a separate CATALINA_HOME and CATALINA_BASE, the files
and directories are split as following:
In CATALINA_BASE:
* bin - Only the following files:
* setenv.sh (*nix) or setenv.bat (Windows),
* tomcat-juli.jar
The setenv scripts were described above. The tomcat-juli library
is documented in the Logging chapter in the User Guide.
* conf - Server configuration files (including server.xml)
* lib - Libraries and classes, as explained below
* logs - Log and output files
* webapps - Automatically loaded web applications
* work - Temporary working directories for web applications
* temp - Directory used by the JVM for temporary files (java.io.tmpdir)
In CATALINA_HOME:
* bin - Startup and shutdown scripts
The following files will be used only if they are absent in
CATALINA_BASE/bin:
setenv.sh (*nix), setenv.bat (Windows), tomcat-juli.jar
* lib - Libraries and classes, as explained below
* endorsed - Libraries that override standard "Endorsed Standards"
libraries provided by JRE. See Classloading documentation
in the User Guide for details.
This is only supported for Java <= 8.
By default this "endorsed" directory is absent.
In the default configuration the JAR libraries and classes both in
CATALINA_BASE/lib and in CATALINA_HOME/lib will be added to the common
classpath, but the ones in CATALINA_BASE will be added first and thus will
be searched first.
The idea is that you may leave the standard Tomcat libraries in
CATALINA_HOME/lib and add other ones such as database drivers into
CATALINA_BASE/lib.
In general it is advised to never share libraries between web applications,
but put them into WEB-INF/lib directories inside the applications. See
Classloading documentation in the User Guide for details.
It might be useful to note that the values of CATALINA_HOME and
CATALINA_BASE can be referenced in the XML configuration files processed
by Tomcat as ${catalina.home} and ${catalina.base} respectively.
For example, the standard manager web application can be kept in
CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
the following trick:
* Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml
* Add docBase attribute as shown below.
The file will look like the following:
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/webapps/manager"
antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.0\.0\.1" />
</Context>
See Deployer chapter in User Guide and Context and Host chapters in the
Configuration Reference for more information on contexts and web
application deployment.
================
Troubleshooting
================
There are only really 2 things likely to go wrong during the stand-alone
Tomcat install:
(1) The most common hiccup is when another web server (or any process for that
matter) has laid claim to port 8080. This is the default HTTP port that
Tomcat attempts to bind to at startup. To change this, open the file:
$CATALINA_HOME/conf/server.xml
and search for '8080'. Change it to a port that isn't in use, and is
greater than 1024, as ports less than or equal to 1024 require superuser
access to bind under UNIX.
Restart Tomcat and you're in business. Be sure that you replace the "8080"
in the URL you're using to access Tomcat. For example, if you change the
port to 1977, you would request the URL http://localhost:1977/ in your
browser.
(2) The 'localhost' machine isn't found. This could happen if you're behind a
proxy. If that's the case, make sure the proxy configuration for your
browser knows that you shouldn't be going through the proxy to access the
"localhost".
In Firefox, this is under Tools/Preferences -> Advanced/Network ->
Connection -> Settings..., and in Internet Explorer it is Tools ->
Internet Options -> Connections -> LAN Settings.
====================
Optional Components
====================
The following optional components may be included with the Apache Tomcat binary
distribution. If they are not included, you can install them separately.
1. Apache Tomcat Native library
2. Apache Commons Daemon service launcher
Both of them are implemented in C language and as such have to be compiled
into binary code. The binary code will be specific for a platform and CPU
architecture and it must match the Java Runtime Environment executables
that will be used to launch Tomcat.
The Windows-specific binary distributions of Apache Tomcat include binary
files for these components. On other platforms you would have to look for
binary versions elsewhere or compile them yourself.
If you are new to Tomcat, do not bother with these components to start with.
If you do use them, do not forget to read their documentation.
Apache Tomcat Native library
-----------------------------
It is a library that allows to use the "Apr" variant of HTTP and AJP
protocol connectors in Apache Tomcat. It is built around OpenSSL and Apache
Portable Runtime (APR) libraries. Those are the same libraries as used by
Apache HTTPD Server project.
This feature was especially important in the old days when Java performance
was poor. It is less important nowadays, but it is still used and respected
by many. See Tomcat documentation for more details.
For further reading:
- Apache Tomcat documentation
* Documentation for APR/Native library in the Tomcat User's Guide
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/apr.html
* Documentation for the HTTP and AJP protocol connectors in the Tomcat
Configuration Reference
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/http.html
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/ajp.html
- Apache Tomcat Native project home
https://tomcat.apache.org/native-doc/
- Other projects
* OpenSSL
https://www.openssl.org/
* Apache Portable Runtime
https://apr.apache.org/
* Apache HTTP Server
https://httpd.apache.org/
To disable Apache Tomcat Native library:
- To disable Apache Tomcat Native library when it is installed, or
- To remove the warning that is logged during Tomcat startup when the
library is not installed:
Edit the "conf/server.xml" file and remove "AprLifecycleListener" from
it.
The binary file of Apache Tomcat Native library is usually named
- "tcnative-1.dll" on Windows
- "libtcnative-1.so" on *nix systems
Apache Commons Daemon
----------------------
Apache Commons Daemon project provides wrappers that can be used to
install Apache Tomcat as a service on Windows or as a daemon on *nix
systems.
The Windows-specific implementation of Apache Commons Daemon is called
"procrun". The *nix-specific one is called "jsvc".
For further reading:
- Apache Commons Daemon project
https://commons.apache.org/daemon/
- Apache Tomcat documentation
* Installing Apache Tomcat
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/setup.html
* Windows Service How-To
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/windows-service-howto.html
The binary files of Apache Commons Daemon in Apache Tomcat distributions
for Windows are named:
- "tomcat@[email protected]"
- "tomcat@[email protected]"
These files are renamed copies of "prunsrv.exe" and "prunmgr.exe" from
Apache Commons Daemon distribution. The file names have a meaning: they are
used as the service name to register the service in Windows, as well as the
key name to store distinct configuration for this installation of
"procrun". If you would like to install several instances of Tomcat @VERSION_MAJOR_MINOR@
in parallel, you have to further rename those files, using the same naming
scheme.
================================================================================
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.
================================================================================
Notes of things to consider for the next major Tomcat release (10.0.x)
Items carried over from the 9.0.x list:
1. Remove the use of system properties to control configuration wherever
possible.
2. Reduce instances of setters and getters for the same property existing on an
object and its parent. This may require new objects to be exposed via JMX.
New items for 10.0.x onwards:
1. Remove APR connector.
2. Connector API and XML refactoring
https://cwiki.apache.org/confluence/display/TOMCAT/Connector+API+refactoring
for details.
Deferred until 10.1.x:
1. Remove the ExtensionValidator and associated classes (assuming that the
minimum Java version is Java 9 or later).
2. Remove org.apache.tomcat.jni and replace with the minimum necessary to
interface with OpenSSL and clones.
We might want to park this one until we see what is available direct from
the JRE with project Panama.
This file has been truncated, but you can view the full file.
/**
* 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.
*/
package jakarta.security.auth.message.config;
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment