init
This commit is contained in:
46
.gitignore
vendored
Normal file
46
.gitignore
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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
|
||||
82
.travis.yml
Normal file
82
.travis.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
# 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 "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:
|
||||
- dev@tomcat.apache.org
|
||||
23
.travis/antTest.sh
Normal file
23
.travis/antTest.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/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
|
||||
564
BUILDING.txt
Normal file
564
BUILDING.txt
Normal file
@@ -0,0 +1,564 @@
|
||||
================================================================================
|
||||
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 subproject contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a container that
|
||||
implements the Servlet 3.1, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1
|
||||
specifications from the Java Community Process <https://www.jcp.org/>.
|
||||
|
||||
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 7 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-@VERSION_MAJOR@0.cgi
|
||||
|
||||
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 SVN 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.
|
||||
It will also be necessary to enable TLS 1.1 and TLS 1.2 by default (they are
|
||||
disabled by default on Java 7) for the build process to communicate with the
|
||||
code signing service. The simplest way is by setting the ANT_OPTS
|
||||
environment variable. E.g. (for Windows):
|
||||
|
||||
set ANT_OPTS=-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2
|
||||
|
||||
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
|
||||
136
CONTRIBUTING.md
Normal file
136
CONTRIBUTING.md
Normal file
@@ -0,0 +1,136 @@
|
||||
# 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](https://tomcat.apache.org/getinvolved.html)
|
||||
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](https://www.apache.org/foundation/policies/conduct.html). By
|
||||
participating, you are expected to adhere to this code. If you are aware of
|
||||
unacceptable behavior, please visit the
|
||||
[Reporting Guidelines page](https://www.apache.org/foundation/policies/conduct.html#reporting-guidelines)
|
||||
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](https://tomcat.apache.org/bugreport.html) 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](https://tomcat.apache.org/lists.html#tomcat-dev).
|
||||
|
||||
* [Beginner issues](https://bz.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&keywords=Beginner&keywords_type=allwords&list_id=160824&product=Tomcat%207&product=Tomcat%208.5&product=Tomcat%209&query_format=advanced) -
|
||||
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:
|
||||
|
||||
- [Tomcat 9](https://tomcat.apache.org/download-90.cgi)
|
||||
- [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
|
||||
- [Tomcat 7](https://tomcat.apache.org/download-70.cgi)
|
||||
|
||||
##### 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 (other
|
||||
other tool).
|
||||
|
||||
##### GitHub
|
||||
|
||||
To submit a GitHub Pull Request you'll need to fork the
|
||||
[repository](https://github.com/apache/tomcat), 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 :smile:
|
||||
|
||||
## 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 :wink:
|
||||
676
KEYS
Normal file
676
KEYS
Normal file
@@ -0,0 +1,676 @@
|
||||
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 <andy@tagish.com>
|
||||
|
||||
-----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) <JFrederic.Clere@fjitsu-siemens.com>
|
||||
|
||||
-----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 <seguin@apache.org>
|
||||
|
||||
-----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 ***
|
||||
<hgomez@users.sourceforge.net>
|
||||
|
||||
-----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 <mturk@apache.org>
|
||||
|
||||
-----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 <yoavs@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: PGP 6.5.8
|
||||
|
||||
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
|
||||
=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 <markt@apache.org>
|
||||
uid Mark E D Thomas <med.thomas@virgin.net>
|
||||
uid Mark E D Thomas <mark.thomas@springsource.com>
|
||||
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 <markt@apache.org>
|
||||
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 <remm@apache.org>
|
||||
sub 4096g/4B6FAEFB 2008-07-02
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.9 (GNU/Linux)
|
||||
|
||||
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
|
||||
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 <yoavs@computer.org>
|
||||
sig 3 0D811BBE 2006-11-14 Yoav Shapira <yoavs@computer.org>
|
||||
sub 2048g/286BACF1 2006-11-14
|
||||
sig 0D811BBE 2006-11-14 Yoav Shapira <yoavs@computer.org>
|
||||
|
||||
-----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) <timw@apache.org>
|
||||
sig 3 731FABEE 2011-05-27 Tim Whittington (CODE SIGNING KEY) <timw@apache.org>
|
||||
sub 4096R/461B342D 2011-05-27
|
||||
sig 731FABEE 2011-05-27 Tim Whittington (CODE SIGNING KEY) <timw@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.11 (Darwin)
|
||||
|
||||
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
|
||||
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) <mturk@apache.org>
|
||||
sig 3 0D498E23 2013-01-14 Mladen Turk (Default signing key) <mturk@apache.org>
|
||||
sub 4096g/DC3D1B18 2013-01-14
|
||||
sig 0D498E23 2013-01-14 Mladen Turk (Default signing key) <mturk@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
||||
|
||||
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
|
||||
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 <jboynes@apache.org>
|
||||
sig 3 A7A0233C 2012-02-25 Jeremy Boynes <jboynes@apache.org>
|
||||
|
||||
-----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) <kkolinko@apache.org>
|
||||
sig 3 FA0C35EA8AA299F1 2018-10-20 Konstantin Kolinko (CODE SIGNING KEY) <kkolinko@apache.org>
|
||||
sub rsa4096 2018-10-20 [E]
|
||||
sig FA0C35EA8AA299F1 2018-10-20 Konstantin Kolinko (CODE SIGNING KEY) <kkolinko@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
mSKqKZpUdvO77XQVYsjBAu3aMluPBNo=
|
||||
=uK1p
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
72
MERGE.txt
Normal file
72
MERGE.txt
Normal file
@@ -0,0 +1,72 @@
|
||||
================================================================================
|
||||
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)
|
||||
51
NOTICE
Normal file
51
NOTICE
Normal file
@@ -0,0 +1,51 @@
|
||||
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).
|
||||
|
||||
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/.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
may be obtained from:
|
||||
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html
|
||||
79
README.md
Normal file
79
README.md
Normal file
@@ -0,0 +1,79 @@
|
||||
## 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](https://jcp.org/en/introduction/overview).
|
||||
|
||||
The Apache Tomcat software is developed in an open and participatory
|
||||
environment and released under the
|
||||
[Apache License version 2](https://www.apache.org/licenses/). 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](https://tomcat.apache.org/getinvolved.html) 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](https://wiki.apache.org/tomcat/PoweredBy).
|
||||
|
||||
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:
|
||||
- [Tomcat 9](https://tomcat.apache.org/download-90.cgi)
|
||||
- [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
|
||||
- [Tomcat 7](https://tomcat.apache.org/download-70.cgi)
|
||||
|
||||
To facilitate choosing the right major Tomcat version one, we have provided a
|
||||
[version overview page](https://tomcat.apache.org/whichversion.html).
|
||||
|
||||
### 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:
|
||||
- [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
|
||||
- [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
|
||||
- [Tomcat 7](https://tomcat.apache.org/tomcat-7.0-doc/)
|
||||
|
||||
### Installation
|
||||
|
||||
Please see [RUNNING.txt](RUNNING.txt) for more info.
|
||||
|
||||
### Licensing
|
||||
|
||||
Please see [LICENSE](LICENSE) for more info.
|
||||
|
||||
### Support and Mailing List Information
|
||||
|
||||
* Free community support is available through the
|
||||
[tomcat-users](https://tomcat.apache.org/lists.html#tomcat-users) email list and
|
||||
a dedicated [IRC channel](https://tomcat.apache.org/irc.html) (#tomcat on
|
||||
Freenode).
|
||||
|
||||
* If you want freely available support for running Apache Tomcat, please see the
|
||||
resources page [here](https://tomcat.apache.org/findhelp.html).
|
||||
|
||||
* 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](https://tomcat.apache.org/lists.html#tomcat-announce) email
|
||||
list.
|
||||
|
||||
* If you have a concrete bug report for Apache Tomcat, please see the
|
||||
instructions for reporting a bug
|
||||
[here](https://tomcat.apache.org/bugreport.html).
|
||||
|
||||
### Contributing
|
||||
|
||||
Please see [CONTRIBUTING](CONTRIBUTING.md) for more info.
|
||||
178
RELEASE-NOTES
Normal file
178
RELEASE-NOTES
Normal file
@@ -0,0 +1,178 @@
|
||||
================================================================================
|
||||
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 public interfaces for the following classes are fixed and will not be
|
||||
changed at all during the remaining lifetime of the @VERSION_MAJOR@.x series:
|
||||
- All classes in the javax 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.
|
||||
|
||||
Note: A large number of deprecated methods, fields and configuration options
|
||||
were removed in the transition from 8.0.x to 8.5.x. If any of those
|
||||
removals triggers significant problems for the user community that the
|
||||
deletion may be reverted in a later point release.
|
||||
|
||||
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-storeconfig.jar (Generation of XML configuration from current state)
|
||||
* catalina-tribes.jar (Group communication)
|
||||
* ecj-@JDT_VERSION@.jar (Eclipse JDT Java compiler)
|
||||
* el-api.jar (EL 3.0 API)
|
||||
* jasper.jar (Jasper 2 Compiler and Runtime)
|
||||
* jasper-el.jar (Jasper 2 EL implementation)
|
||||
* jsp-api.jar (JSP 2.3 API)
|
||||
* servlet-api.jar (Servlet 3.1 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 1.1 implementation)
|
||||
* websocket-api.jar (WebSocket 1.1 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/
|
||||
476
RUNNING.txt
Normal file
476
RUNNING.txt
Normal file
@@ -0,0 +1,476 @@
|
||||
================================================================================
|
||||
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 7 or later.
|
||||
|
||||
=============================
|
||||
Running With JRE 7 Or Later
|
||||
=============================
|
||||
|
||||
(1) Download and Install a Java SE Runtime Environment (JRE)
|
||||
|
||||
(1.1) Download a Java SE Runtime Environment (JRE),
|
||||
release version 7 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@VERSION_MAJOR@.exe"
|
||||
- "tomcat@VERSION_MAJOR@w.exe"
|
||||
|
||||
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.
|
||||
39
bin/catalina-tasks.xml
Normal file
39
bin/catalina-tasks.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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>
|
||||
374
bin/catalina.bat
Normal file
374
bin/catalina.bat
Normal file
@@ -0,0 +1,374 @@
|
||||
@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@VERSION_MAJOR@w.exe"
|
||||
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 LOGGING_CONFIG (Optional) Override Tomcat's logging config file
|
||||
rem Example (all one line)
|
||||
rem set 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 "%LOGGING_CONFIG%" == "" goto noJuliConfig
|
||||
set LOGGING_CONFIG=-Dnop
|
||||
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
|
||||
set 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% %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% %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% %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% %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
|
||||
655
bin/catalina.sh
Normal file
655
bin/catalina.sh
Normal file
@@ -0,0 +1,655 @@
|
||||
#!/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
|
||||
#
|
||||
# LOGGING_CONFIG (Optional) Override Tomcat's logging config file
|
||||
# Example (all one line)
|
||||
# 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 "$LOGGING_CONFIG" ]; then
|
||||
if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
|
||||
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
|
||||
else
|
||||
# Bugzilla 45585
|
||||
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" "$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" "$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\"" "\"$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\"" "\"$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\"" "\"$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\"" "\"$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
|
||||
58
bin/ciphers.bat
Normal file
58
bin/ciphers.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Script to digest password using the algorithm specified
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set "CURRENT_DIR=%cd%"
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
cd ..
|
||||
set "CATALINA_HOME=%cd%"
|
||||
cd "%CURRENT_DIR%"
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find "%EXECUTABLE%"
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
60
bin/ciphers.sh
Normal file
60
bin/ciphers.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Script to digest password using the algorithm specified
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Better OS/400 detection: see Bugzilla 31132
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=tool-wrapper.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if $os400; then
|
||||
# -x will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
eval
|
||||
else
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "The file is absent or does not have execute permission"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser "$@"
|
||||
58
bin/configtest.bat
Normal file
58
bin/configtest.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Configuration test script for the CATALINA Server
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set "CURRENT_DIR=%cd%"
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
cd ..
|
||||
set "CATALINA_HOME=%cd%"
|
||||
cd "%CURRENT_DIR%"
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find "%EXECUTABLE%"
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" configtest %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
60
bin/configtest.sh
Normal file
60
bin/configtest.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration Test Script for the CATALINA Server
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Better OS/400 detection: see Bugzilla 31132
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=catalina.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if $os400; then
|
||||
# -x will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
eval
|
||||
else
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "The file is absent or does not have execute permission"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" configtest "$@"
|
||||
277
bin/daemon.sh
Normal file
277
bin/daemon.sh
Normal file
@@ -0,0 +1,277 @@
|
||||
#!/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
|
||||
# JAVA_HOME=/opt/jdk-1.6.0.22
|
||||
# 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 "$LOGGING_CONFIG" ]; then
|
||||
if [ -r "$CATALINA_BASE/conf/logging.properties" ]; then
|
||||
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
|
||||
else
|
||||
# Bugzilla 45585
|
||||
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
|
||||
|
||||
# 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 \
|
||||
-nodetach \
|
||||
-outfile "\"&1\"" \
|
||||
-errfile "\"&2\"" \
|
||||
-classpath "\"$CLASSPATH\"" \
|
||||
"\"$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 \
|
||||
-outfile "\"$CATALINA_OUT\"" \
|
||||
-errfile "\"&1\"" \
|
||||
-classpath "\"$CLASSPATH\"" \
|
||||
"\"$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
|
||||
58
bin/digest.bat
Normal file
58
bin/digest.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Script to digest password using the algorithm specified
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set "CURRENT_DIR=%cd%"
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
cd ..
|
||||
set "CATALINA_HOME=%cd%"
|
||||
cd "%CURRENT_DIR%"
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find "%EXECUTABLE%"
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
60
bin/digest.sh
Normal file
60
bin/digest.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Script to digest password using the algorithm specified
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Better OS/400 detection: see Bugzilla 31132
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=tool-wrapper.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if $os400; then
|
||||
# -x will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
eval
|
||||
else
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "The file is absent or does not have execute permission"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"
|
||||
239
bin/service.bat
Normal file
239
bin/service.bat
Normal file
@@ -0,0 +1,239 @@
|
||||
@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@VERSION_MAJOR@.exe and tomcat@VERSION_MAJOR@w.exe to match
|
||||
rem the non-default service name.
|
||||
rem
|
||||
rem username (optional) The name of the OS user to use to install/remove
|
||||
rem the service (not the name of the OS user the
|
||||
rem service will run as). If not specified, the current
|
||||
rem user is used.
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
set "SELF=%~dp0%service.bat"
|
||||
|
||||
set DEFAULT_SERVICE_NAME=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
|
||||
94
bin/setclasspath.bat
Normal file
94
bin/setclasspath.bat
Normal file
@@ -0,0 +1,94 @@
|
||||
@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
|
||||
98
bin/setclasspath.sh
Normal file
98
bin/setclasspath.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
#!/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
|
||||
58
bin/shutdown.bat
Normal file
58
bin/shutdown.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem 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
|
||||
60
bin/shutdown.sh
Normal file
60
bin/shutdown.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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 "$@"
|
||||
58
bin/startup.bat
Normal file
58
bin/startup.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem 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
|
||||
60
bin/startup.sh
Normal file
60
bin/startup.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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 "$@"
|
||||
110
bin/tool-wrapper.bat
Normal file
110
bin/tool-wrapper.bat
Normal file
@@ -0,0 +1,110 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Wrapper script for command line tools
|
||||
rem
|
||||
rem Environment Variable Prerequisites
|
||||
rem
|
||||
rem CATALINA_HOME May point at your Catalina "build" directory.
|
||||
rem
|
||||
rem TOOL_OPTS (Optional) Java runtime options.
|
||||
rem
|
||||
rem JAVA_HOME Must point at your Java Development Kit installation.
|
||||
rem Using JRE_HOME instead works as well.
|
||||
rem
|
||||
rem JRE_HOME Must point at your Java Runtime installation.
|
||||
rem Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
|
||||
rem are both set, JRE_HOME is used.
|
||||
rem
|
||||
rem JAVA_OPTS (Optional) Java runtime options.
|
||||
rem
|
||||
rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
|
||||
rem containing some jars in order to allow replacement of APIs
|
||||
rem created outside of the JCP (i.e. DOM and SAX from W3C).
|
||||
rem It can also be used to update the XML parser implementation.
|
||||
rem This is only supported for Java <= 8.
|
||||
rem Defaults to $CATALINA_HOME/endorsed.
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set "CURRENT_DIR=%cd%"
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
cd ..
|
||||
set "CATALINA_HOME=%cd%"
|
||||
cd "%CURRENT_DIR%"
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
rem Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||
rem but allow them to be specified in setenv.bat, in rare case when it is needed.
|
||||
set CLASSPATH=
|
||||
|
||||
rem Get standard environment variables
|
||||
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
|
||||
|
||||
rem Get standard Java environment variables
|
||||
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
|
||||
echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okSetclasspath
|
||||
call "%CATALINA_HOME%\bin\setclasspath.bat" %1
|
||||
if errorlevel 1 goto end
|
||||
|
||||
rem Add on extra jar files to CLASSPATH
|
||||
rem Note that there are no quotes as we do not want to introduce random
|
||||
rem quotes into the CLASSPATH
|
||||
if "%CLASSPATH%" == "" goto emptyClasspath
|
||||
set "CLASSPATH=%CLASSPATH%;"
|
||||
:emptyClasspath
|
||||
set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\tomcat-util.jar"
|
||||
|
||||
set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
|
||||
rem Java 9 no longer supports the java.endorsed.dirs
|
||||
rem system property. Only try to use it if
|
||||
rem JAVA_ENDORSED_DIRS was explicitly set
|
||||
rem or CATALINA_HOME/endorsed exists.
|
||||
set ENDORSED_PROP=ignore.endorsed.dirs
|
||||
if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar
|
||||
set ENDORSED_PROP=java.endorsed.dirs
|
||||
goto doneEndorsed
|
||||
:noEndorsedVar
|
||||
if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed
|
||||
set ENDORSED_PROP=java.endorsed.dirs
|
||||
:doneEndorsed
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
153
bin/tool-wrapper.sh
Normal file
153
bin/tool-wrapper.sh
Normal file
@@ -0,0 +1,153 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Wrapper script for command line tools
|
||||
#
|
||||
# Environment Variable Prerequisites
|
||||
#
|
||||
# CATALINA_HOME May point at your Catalina "build" directory.
|
||||
#
|
||||
# TOOL_OPTS (Optional) Java runtime options.
|
||||
#
|
||||
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||
# Using JRE_HOME instead works as well.
|
||||
#
|
||||
# JRE_HOME Must point at your Java Runtime installation.
|
||||
# Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
|
||||
# are both set, JRE_HOME is used.
|
||||
#
|
||||
# JAVA_OPTS (Optional) Java runtime options.
|
||||
#
|
||||
# JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
|
||||
# containing some jars in order to allow replacement of APIs
|
||||
# created outside of the JCP (i.e. DOM and SAX from W3C).
|
||||
# It can also be used to update the XML parser implementation.
|
||||
# This is only supported for Java <= 8.
|
||||
# Defaults to $CATALINA_HOME/endorsed.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
darwin=false
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true;;
|
||||
Darwin*) darwin=true;;
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get standard environment variables
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
|
||||
# Only set CATALINA_HOME if not already set
|
||||
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||
|
||||
# Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||
# but allow them to be specified in setenv.sh, in rare case when it is needed.
|
||||
CLASSPATH=
|
||||
|
||||
if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
|
||||
. "$CATALINA_HOME/bin/setenv.sh"
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
|
||||
[ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
|
||||
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For OS400
|
||||
if $os400; then
|
||||
# Set job priority to standard for interactive (interactive - 6) by using
|
||||
# the interactive priority - 6, the helper threads that respond to requests
|
||||
# will be running at the same priority as interactive jobs.
|
||||
COMMAND='chgjob job('$JOBNAME') runpty(6)'
|
||||
system $COMMAND
|
||||
|
||||
# Enable multi threading
|
||||
export QIBM_MULTI_THREADED=Y
|
||||
fi
|
||||
|
||||
# Get standard Java environment variables
|
||||
if $os400; then
|
||||
# -r will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||
else
|
||||
if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
|
||||
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||
else
|
||||
echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add on extra jar files to CLASSPATH
|
||||
if [ ! -z "$CLASSPATH" ] ; then
|
||||
CLASSPATH="$CLASSPATH":
|
||||
fi
|
||||
CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/tomcat-juli.jar:"$CATALINA_HOME"/lib/servlet-api.jar:"$CATALINA_HOME"/lib/tomcat-util.jar
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
|
||||
JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
|
||||
CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$JAVA_ENDORSED_DIRS" ] && JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
|
||||
fi
|
||||
|
||||
# Java 9 no longer supports the java.endorsed.dirs
|
||||
# system property. Only try to use it if
|
||||
# JAVA_ENDORSED_DIRS was explicitly set
|
||||
# or CATALINA_HOME/endorsed exists.
|
||||
ENDORSED_PROP=ignore.endorsed.dirs
|
||||
if [ -n "$JAVA_ENDORSED_DIRS" ]; then
|
||||
ENDORSED_PROP=java.endorsed.dirs
|
||||
fi
|
||||
if [ -d "$CATALINA_HOME/endorsed" ]; then
|
||||
ENDORSED_PROP=java.endorsed.dirs
|
||||
fi
|
||||
|
||||
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
|
||||
|
||||
# ----- Execute The Requested Command -----------------------------------------
|
||||
|
||||
eval exec "\"$_RUNJAVA\"" "$JAVA_OPTS" "$TOOL_OPTS" \
|
||||
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||
-classpath "\"$CLASSPATH\"" \
|
||||
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||
org.apache.catalina.startup.Tool "$@"
|
||||
58
bin/version.bat
Normal file
58
bin/version.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Version script for the CATALINA Server
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set "CURRENT_DIR=%cd%"
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
cd ..
|
||||
set "CATALINA_HOME=%cd%"
|
||||
cd "%CURRENT_DIR%"
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find "%EXECUTABLE%"
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" version %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
60
bin/version.sh
Normal file
60
bin/version.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Version Script for the CATALINA Server
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Better OS/400 detection: see Bugzilla 31132
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=catalina.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if $os400; then
|
||||
# -x will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
eval
|
||||
else
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "The file is absent or does not have execute permission"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" version "$@"
|
||||
293
build.properties.default
Normal file
293
build.properties.default
Normal file
@@ -0,0 +1,293 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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=8
|
||||
version.minor=5
|
||||
version.build=51
|
||||
version.patch=0
|
||||
version.suffix=
|
||||
|
||||
# ----- Source control flags -----
|
||||
git.branch=8.5.x
|
||||
|
||||
# ----- Build control flags -----
|
||||
# Note enabling validation uses Checkstyle which is LGPL licensed
|
||||
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-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
|
||||
|
||||
# checkstyle-backport-jre6
|
||||
base-checkstyle.loc=https://rnveach.github.io/checkstyle-backport-jre6/maven2
|
||||
|
||||
# ----- 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.5.1 or later -----#
|
||||
# See https://cwiki.apache.org/confluence/display/TOMCAT/Managing+Tomcat%27s+Dependency+on+the+Eclipse+JDT+Core+Batch+Compiler
|
||||
#
|
||||
# 4.6.3 is the latest release that runs on Java 7
|
||||
# Later versions can be used but the official builds need to use 4.6.3
|
||||
#
|
||||
# Checksum is from "SHA512 Checksums for 4.6.3" link at
|
||||
# http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/
|
||||
# http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/checksum/eclipse-4.6.3-SUMSSHA512
|
||||
#
|
||||
jdt.version=4.6.3
|
||||
jdt.release=R-4.6.3-201703010400
|
||||
jdt.checksum.enabled=true
|
||||
jdt.checksum.algorithm=SHA-512
|
||||
jdt.checksum.value=372da97d5f37095a3616c730170dc541b93acb8f50370cd9b0d81fba4583e865f0c933dc012155f26638306b82a402eaab209123cd0a979fa7c86313c0fca477
|
||||
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 7 requires Java 8
|
||||
# Therefore, use checkstyle-backport-jre6
|
||||
checkstyle.version=8.22
|
||||
checkstyle.checksum.enabled=true
|
||||
checkstyle.checksum.algorithm=MD5|SHA-1
|
||||
checkstyle.checksum.value=03cb9ae24d4103134095ccd650b3bbb7|32d2996bedc97ee4e22c50e6ff5a8b571c8d816e
|
||||
checkstyle.home=${base.path}/checkstyle-backport-jre6-${checkstyle.version}
|
||||
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
|
||||
checkstyle.loc=${base-checkstyle.loc}/com/puppycrawl/tools/checkstyle-backport-jre6/${checkstyle.version}/checkstyle-backport-jre6-${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
|
||||
271
conf/catalina.policy
Normal file
271
conf/catalina.policy
Normal file
@@ -0,0 +1,271 @@
|
||||
// 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.*";
|
||||
|
||||
// The cookie code needs these.
|
||||
permission java.util.PropertyPermission
|
||||
"org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
|
||||
|
||||
// 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";
|
||||
|
||||
// Applications need to access these packages to use the Servlet 4.0 Preview
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.servlet4preview.http";
|
||||
};
|
||||
|
||||
|
||||
// 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" {
|
||||
// };
|
||||
214
conf/catalina.properties
Normal file
214
conf/catalina.properties
Normal file
@@ -0,0 +1,214 @@
|
||||
# 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-jmx-remote.jar,\
|
||||
catalina-storeconfig.jar,\
|
||||
catalina-tribes.jar,\
|
||||
catalina-ws.jar,\
|
||||
catalina.jar,\
|
||||
cglib-*.jar,\
|
||||
cobertura-*.jar,\
|
||||
commons-beanutils*.jar,\
|
||||
commons-codec*.jar,\
|
||||
commons-collections*.jar,\
|
||||
commons-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
|
||||
|
||||
# This system property is deprecated. Use the relaxedPathChars relaxedQueryChars
|
||||
# attributes of the Connector instead. These attributes permit a wider range of
|
||||
# characters to be configured as valid.
|
||||
# Allow for changes to HTTP request validation
|
||||
# WARNING: Using this option may expose the server to CVE-2016-6816
|
||||
#tomcat.util.http.parser.HttpParser.requestTargetAllow=|
|
||||
30
conf/context.xml
Normal file
30
conf/context.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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>${catalina.base}/conf/web.xml</WatchedResource>
|
||||
|
||||
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
|
||||
<!--
|
||||
<Manager pathname="" />
|
||||
-->
|
||||
</Context>
|
||||
23
conf/jaspic-providers.xml
Normal file
23
conf/jaspic-providers.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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>
|
||||
53
conf/jaspic-providers.xsd
Normal file
53
conf/jaspic-providers.xsd
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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>
|
||||
75
conf/logging.properties
Normal file
75
conf/logging.properties
Normal file
@@ -0,0 +1,75 @@
|
||||
# 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.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.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.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.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
|
||||
171
conf/server.xml
Normal file
171
conf/server.xml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?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 "%r" %s %b" />
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
</Server>
|
||||
44
conf/tomcat-users.xml
Normal file
44
conf/tomcat-users.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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>
|
||||
59
conf/tomcat-users.xsd
Normal file
59
conf/tomcat-users.xsd
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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>
|
||||
4731
conf/web.xml
Normal file
4731
conf/web.xml
Normal file
File diff suppressed because it is too large
Load Diff
37
java/javax/annotation/Generated.java
Normal file
37
java/javax/annotation/Generated.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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 javax.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 "";
|
||||
}
|
||||
31
java/javax/annotation/ManagedBean.java
Normal file
31
java/javax/annotation/ManagedBean.java
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 javax.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 "";
|
||||
}
|
||||
33
java/javax/annotation/PostConstruct.java
Normal file
33
java/javax/annotation/PostConstruct.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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
|
||||
}
|
||||
33
java/javax/annotation/PreDestroy.java
Normal file
33
java/javax/annotation/PreDestroy.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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
|
||||
}
|
||||
33
java/javax/annotation/Priority.java
Normal file
33
java/javax/annotation/Priority.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
51
java/javax/annotation/Resource.java
Normal file
51
java/javax/annotation/Resource.java
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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 javax.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 "";
|
||||
}
|
||||
33
java/javax/annotation/Resources.java
Normal file
33
java/javax/annotation/Resources.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
33
java/javax/annotation/security/DeclareRoles.java
Normal file
33
java/javax/annotation/security/DeclareRoles.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
33
java/javax/annotation/security/DenyAll.java
Normal file
33
java/javax/annotation/security/DenyAll.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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
|
||||
}
|
||||
33
java/javax/annotation/security/PermitAll.java
Normal file
33
java/javax/annotation/security/PermitAll.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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
|
||||
}
|
||||
33
java/javax/annotation/security/RolesAllowed.java
Normal file
33
java/javax/annotation/security/RolesAllowed.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
33
java/javax/annotation/security/RunAs.java
Normal file
33
java/javax/annotation/security/RunAs.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
48
java/javax/annotation/sql/DataSourceDefinition.java
Normal file
48
java/javax/annotation/sql/DataSourceDefinition.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
31
java/javax/annotation/sql/DataSourceDefinitions.java
Normal file
31
java/javax/annotation/sql/DataSourceDefinitions.java
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
37
java/javax/ejb/EJB.java
Normal file
37
java/javax/ejb/EJB.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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 javax.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 "";
|
||||
}
|
||||
31
java/javax/ejb/EJBs.java
Normal file
31
java/javax/ejb/EJBs.java
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
150
java/javax/el/ArrayELResolver.java
Normal file
150
java/javax/el/ArrayELResolver.java
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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 javax.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");
|
||||
}
|
||||
|
||||
}
|
||||
372
java/javax/el/BeanELResolver.java
Normal file
372
java/javax/el/BeanELResolver.java
Normal file
@@ -0,0 +1,372 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
155
java/javax/el/BeanNameELResolver.java
Normal file
155
java/javax/el/BeanNameELResolver.java
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
91
java/javax/el/BeanNameResolver.java
Normal file
91
java/javax/el/BeanNameResolver.java
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
233
java/javax/el/CompositeELResolver.java
Normal file
233
java/javax/el/CompositeELResolver.java
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
* 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 javax.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("javax.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
|
||||
// javax.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
java/javax/el/ELClass.java
Normal file
33
java/javax/el/ELClass.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 javax.el;
|
||||
|
||||
/**
|
||||
* @since EL 3.0
|
||||
*/
|
||||
public class ELClass {
|
||||
|
||||
private final Class<?> clazz;
|
||||
|
||||
public ELClass(Class<?> clazz) {
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
public Class<?> getKlass() {
|
||||
return clazz;
|
||||
}
|
||||
}
|
||||
306
java/javax/el/ELContext.java
Normal file
306
java/javax/el/ELContext.java
Normal file
@@ -0,0 +1,306 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
|
||||
// Can't use Class<?> because API needs to match specification
|
||||
/**
|
||||
* 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(@SuppressWarnings("rawtypes") Class key,
|
||||
Object contextObject) {
|
||||
Objects.requireNonNull(key);
|
||||
Objects.requireNonNull(contextObject);
|
||||
|
||||
if (this.map == null) {
|
||||
this.map = new HashMap<>();
|
||||
}
|
||||
|
||||
this.map.put(key, contextObject);
|
||||
}
|
||||
|
||||
// Can't use Class<?> because API needs to match specification
|
||||
/**
|
||||
* 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(@SuppressWarnings("rawtypes") 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);
|
||||
}
|
||||
}
|
||||
37
java/javax/el/ELContextEvent.java
Normal file
37
java/javax/el/ELContextEvent.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
}
|
||||
|
||||
}
|
||||
28
java/javax/el/ELContextListener.java
Normal file
28
java/javax/el/ELContextListener.java
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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 javax.el;
|
||||
|
||||
/**
|
||||
* @author Jacob Hookom [jacob/hookom.net]
|
||||
*
|
||||
*/
|
||||
public interface ELContextListener extends java.util.EventListener {
|
||||
|
||||
public void contextCreated(ELContextEvent event);
|
||||
|
||||
}
|
||||
68
java/javax/el/ELException.java
Normal file
68
java/javax/el/ELException.java
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
}
|
||||
90
java/javax/el/ELManager.java
Normal file
90
java/javax/el/ELManager.java
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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 javax.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 javax.el.ELException {
|
||||
getELContext().getImportHandler().importStatic(staticMemberName);
|
||||
}
|
||||
|
||||
public void importClass(String className) throws javax.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);
|
||||
}
|
||||
}
|
||||
362
java/javax/el/ELProcessor.java
Normal file
362
java/javax/el/ELProcessor.java
Normal file
@@ -0,0 +1,362 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
142
java/javax/el/ELResolver.java
Normal file
142
java/javax/el/ELResolver.java
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
55
java/javax/el/EvaluationListener.java
Normal file
55
java/javax/el/EvaluationListener.java
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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 javax.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
|
||||
}
|
||||
}
|
||||
39
java/javax/el/Expression.java
Normal file
39
java/javax/el/Expression.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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 javax.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();
|
||||
|
||||
}
|
||||
414
java/javax/el/ExpressionFactory.java
Normal file
414
java/javax/el/ExpressionFactory.java
Normal file
@@ -0,0 +1,414 @@
|
||||
/*
|
||||
* 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 javax.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.ConcurrentMap;
|
||||
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 = "javax.el.ExpressionFactory";
|
||||
|
||||
private static final String PROPERTY_FILE;
|
||||
|
||||
private static final CacheValue nullTcclFactory = new CacheValue();
|
||||
private static final ConcurrentMap<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/javax.el.ExpressionFactory)</li>
|
||||
* <li>$JRE_HOME/lib/el.properties - key javax.el.ExpressionFactory</li>
|
||||
* <li>javax.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<Class<?>>(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;
|
||||
}
|
||||
|
||||
}
|
||||
37
java/javax/el/FunctionMapper.java
Normal file
37
java/javax/el/FunctionMapper.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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 javax.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
|
||||
}
|
||||
}
|
||||
491
java/javax/el/ImportHandler.java
Normal file
491
java/javax/el/ImportHandler.java
Normal file
@@ -0,0 +1,491 @@
|
||||
/*
|
||||
* 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 javax.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 4.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("javax.servlet", servletClassNames);
|
||||
|
||||
// Servlet 4.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("javax.servlet.http", servletHttpClassNames);
|
||||
|
||||
// JSP 2.3
|
||||
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("javax.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 ConcurrentHashMap<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 javax.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 javax.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) {
|
||||
preloaded = Collections.emptySet();
|
||||
}
|
||||
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 {
|
||||
}
|
||||
}
|
||||
83
java/javax/el/Jre9Compat.java
Normal file
83
java/javax/el/Jre9Compat.java
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
73
java/javax/el/JreCompat.java
Normal file
73
java/javax/el/JreCompat.java
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
93
java/javax/el/LambdaExpression.java
Normal file
93
java/javax/el/LambdaExpression.java
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
}
|
||||
155
java/javax/el/ListELResolver.java
Normal file
155
java/javax/el/ListELResolver.java
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* 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 javax.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");
|
||||
}
|
||||
}
|
||||
52
java/javax/el/LocalStrings.properties
Normal file
52
java/javax/el/LocalStrings.properties
Normal file
@@ -0,0 +1,52 @@
|
||||
# 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, non-abstract, not an interface and (for Java 9+) in an exported package
|
||||
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})
|
||||
22
java/javax/el/LocalStrings_de.properties
Normal file
22
java/javax/el/LocalStrings_de.properties
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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}]
|
||||
28
java/javax/el/LocalStrings_es.properties
Normal file
28
java/javax/el/LocalStrings_es.properties
Normal file
@@ -0,0 +1,28 @@
|
||||
# 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}]
|
||||
52
java/javax/el/LocalStrings_fr.properties
Normal file
52
java/javax/el/LocalStrings_fr.properties
Normal file
@@ -0,0 +1,52 @@
|
||||
# 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, et ne pas être une interface
|
||||
importHandler.invalidClassName=Le nom de la classe à importer [{0}] doit comprendre un paquet
|
||||
importHandler.invalidClassNameForStatic=La classe [{0}] spécifiée pour l''importation 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=Un champ statique et public nommé [{0}] n''a pas pu être trouvé sur la classe [{1}]
|
||||
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})
|
||||
52
java/javax/el/LocalStrings_ja.properties
Normal file
52
java/javax/el/LocalStrings_ja.properties
Normal file
@@ -0,0 +1,52 @@
|
||||
# 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})
|
||||
52
java/javax/el/LocalStrings_ko.properties
Normal file
52
java/javax/el/LocalStrings_ko.properties
Normal file
@@ -0,0 +1,52 @@
|
||||
# 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})
|
||||
50
java/javax/el/LocalStrings_zh_CN.properties
Normal file
50
java/javax/el/LocalStrings_zh_CN.properties
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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})
|
||||
136
java/javax/el/MapELResolver.java
Normal file
136
java/javax/el/MapELResolver.java
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
|
||||
}
|
||||
84
java/javax/el/MethodExpression.java
Normal file
84
java/javax/el/MethodExpression.java
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
44
java/javax/el/MethodInfo.java
Normal file
44
java/javax/el/MethodInfo.java
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
38
java/javax/el/MethodNotFoundException.java
Normal file
38
java/javax/el/MethodNotFoundException.java
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
}
|
||||
38
java/javax/el/PropertyNotFoundException.java
Normal file
38
java/javax/el/PropertyNotFoundException.java
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
}
|
||||
38
java/javax/el/PropertyNotWritableException.java
Normal file
38
java/javax/el/PropertyNotWritableException.java
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
}
|
||||
124
java/javax/el/ResourceBundleELResolver.java
Normal file
124
java/javax/el/ResourceBundleELResolver.java
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
|
||||
}
|
||||
210
java/javax/el/StandardELContext.java
Normal file
210
java/javax/el/StandardELContext.java
Normal file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* 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 javax.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());
|
||||
}
|
||||
|
||||
// Can't use Class<?> because API needs to match specification
|
||||
@Override
|
||||
public void putContext(@SuppressWarnings("rawtypes") Class key,
|
||||
Object contextObject) {
|
||||
if (wrappedContext == null) {
|
||||
super.putContext(key, contextObject);
|
||||
} else {
|
||||
wrappedContext.putContext(key, contextObject);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getContext(@SuppressWarnings("rawtypes") 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
209
java/javax/el/StaticFieldELResolver.java
Normal file
209
java/javax/el/StaticFieldELResolver.java
Normal file
@@ -0,0 +1,209 @@
|
||||
/*
|
||||
* 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 javax.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;
|
||||
}
|
||||
}
|
||||
62
java/javax/el/TypeConverter.java
Normal file
62
java/javax/el/TypeConverter.java
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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 javax.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);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user