Skip to content
Commits on Source (19)
# -----------------------------------------------------------------------------
# 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.
# -----------------------------------------------------------------------------
# bug52121-part1, bug52121-part2 files are test data for a hard
# to reproduce testcase and should be treated as binary.
test/org/apache/coyote/http11/filters/bug52121-part1 binary
test/org/apache/coyote/http11/filters/bug52121-part2 binary
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
==================================================== ====================================================
This subproject contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a container that This subproject contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a container that
implements the Servlet 3.0 and JSP 2.2 specifications from the Java implements the Servlet 3.0, JSP 2.2, EL 2.2 and WebSocket 1.1 specifications
Community Process <http://www.jcp.org/>. from the Java Community Process <http://www.jcp.org/>.
Note: If you just need to run Apache Tomcat, it is not necessary to build 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. it. You may simply download a binary distribution. It is cross-platform.
...@@ -79,7 +79,7 @@ source distribution, do the following: ...@@ -79,7 +79,7 @@ source distribution, do the following:
release. release.
* NOTE: The Java 7 JDK is only required if you wish to build Tomcat with * NOTE: The Java 7 JDK is only required if you wish to build Tomcat with
JSR-356 (Java WebSocket 1.0) support. JSR-356 (Java WebSocket 1.1) support.
(2) Install Apache Ant version 1.8.2 or later on your computer (2) Install Apache Ant version 1.8.2 or later on your computer
...@@ -125,6 +125,18 @@ package. ...@@ -125,6 +125,18 @@ package.
The location where the source has been placed will be further referred as The location where the source has been placed will be further referred as
${tomcat.source}. ${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 (3.2) Building
1. The build is controlled by creating a ${tomcat.source}/build.properties 1. The build is controlled by creating a ${tomcat.source}/build.properties
...@@ -147,14 +159,9 @@ ${tomcat.source}. ...@@ -147,14 +159,9 @@ ${tomcat.source}.
directory outside of the source tree, so that you do not waste your directory outside of the source tree, so that you do not waste your
time re-downloading the libraries. time re-downloading the libraries.
* WARNING: The default value of base.path property makes the build script * NOTE: The default value of the base.path property configures the build script
to download libraries required to build Tomcat to the /usr/share/java to download the libraries required to build Tomcat to the
directory. On a typical Linux or MacOX system an ordinary user will not ${user.home}/tomcat-build-libs directory.
have access to write to this directory. Even if you do have access to
that directory, it is likely not appropriate for you to write there.
On Windows this usually corresponds to the "C:\usr\share\java"
directory, unless Cygwin is used.
* NOTE: Users accessing the Internet through a proxy must use the properties * NOTE: Users accessing the Internet through a proxy must use the properties
file to indicate to Ant the proxy configuration. file to indicate to Ant the proxy configuration.
...@@ -170,7 +177,7 @@ ${tomcat.source}. ...@@ -170,7 +177,7 @@ ${tomcat.source}.
See Apache Ant documentation for the <setproxy> task for details. See Apache Ant documentation for the <setproxy> task for details.
* NOTE: Users wishing to build Tomcat with JSR-356 (Java WebSocket 1.0) support * NOTE: Users wishing to build Tomcat with JSR-356 (Java WebSocket 1.1) support
must also set the java.7.home build property to the location of the Java 7 JDK must also set the java.7.home build property to the location of the Java 7 JDK
installation. installation.
...@@ -267,7 +274,7 @@ You can build them by using the following commands: ...@@ -267,7 +274,7 @@ You can build them by using the following commands:
A full release includes the Windows installer which requires a Windows 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 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 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 the case, the skip.installer property may be set to skip the creation of the
Windows installer. Windows installer.
...@@ -314,7 +321,6 @@ directory: ...@@ -314,7 +321,6 @@ directory:
output/build/logs output/build/logs
By default the testsuite is run three times to test 3 different By default the testsuite is run three times to test 3 different
implementations of Tomcat connectors: BIO, NIO and APR. (If you are not implementations of Tomcat connectors: BIO, NIO and APR. (If you are not
familiar with Tomcat connectors, see config/http.html in documentation for familiar with Tomcat connectors, see config/http.html in documentation for
...@@ -358,8 +364,7 @@ For example: ...@@ -358,8 +364,7 @@ For example:
It is possible to further limit such run to a number of selected test 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 methods by adding "test.entry.methods" property. The property specifies a
comma-separated list of test case methods. (This feature requires comma-separated list of test case methods.
Apache Ant 1.8.2 or later).
For example: For example:
...@@ -367,7 +372,30 @@ For example: ...@@ -367,7 +372,30 @@ For example:
test.entry.methods=testMultiply01,testMultiply02 test.entry.methods=testMultiply01,testMultiply02
(7.3) Other configuration options (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 1. It is possible to configure the directory where JUnit reports are
written to. It is configured by "test.reports" property. The default written to. It is configured by "test.reports" property. The default
...@@ -403,8 +431,13 @@ For example: ...@@ -403,8 +431,13 @@ For example:
junit.formatter.usefile=false junit.formatter.usefile=false
5. Optional support is provided for the Cobertura code coverage tool. It 5. Optional support is provided for the Cobertura code coverage tool.
can be enabled using the following property:
* NOTE: Cobertura is licensed under GPL v2 with parts of it being under
Apache License v1.1. See http://cobertura.sf.net for details. Using it
during Tomcat build is optional and is off by default.
Cobertura can be enabled using the following property:
test.cobertura=true test.cobertura=true
...@@ -412,10 +445,33 @@ For example: ...@@ -412,10 +445,33 @@ For example:
output/coverage output/coverage
* NOTE: Cobertura is licensed under GPL v2 with parts of it being under 6. The performance tests are written to run reasonably powerful machines (such
Apache License v1.1. See http://cobertura.sf.net for details. Using it as a developer may use day to day) assuming no other resource hungry
during Tomcat build is optional and is off by default. 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
7. 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
8. 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
9. 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) Source code checks
...@@ -424,6 +480,8 @@ For example: ...@@ -424,6 +480,8 @@ For example:
* NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat * NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat
build is optional and is off by default. 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 Tomcat comes with a Checkstyle configuration that tests its source code
for certain conventions, like presence of the license header. for certain conventions, like presence of the license header.
...@@ -439,7 +497,7 @@ is located in the following directory: ...@@ -439,7 +497,7 @@ is located in the following directory:
output/res/checkstyle output/res/checkstyle
It is possible to run the check separately by invoking the "validate" It is possible to run the check separately by calling the "validate"
target. The command is: target. The command is:
cd ${tomcat.source} cd ${tomcat.source}
......
# Contributing to Apache Tomcat
Firstly, thanks for your interest in contributing! I hope that this will be a
pleasant first experience for you, and that you will return to continue
contributing.
Please visit our [Get Involved page](http://tomcat.apache.org/getinvolved.html)
for more information on how to contribute.
## Code of Conduct
This project and everyone participating in it is governed by the Apache
software Foundation's
[Code of Conduct](http://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](http://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](http://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](http://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&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, 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.
##### Chose Your Method of Submission
You can provide a patch in one of the following ways (in order of preference):
* Patch attachment to the Bugzilla issue
* Github Pull Request
> **Note:** Github is a mirror of the SVN repository that Tomcat is stored in
and therefore it can't be merged outright. Your contribution will be converted
into an SVN patch and committed with a mention of your name for credit.
* 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 (like you would do for SVN), 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](https://tomcat.apache.org/download-90.cgi).
###### SVN
If you have chosen to attach a patch to the Bugzilla issue (or email
one), then you'll need to checkout the SVN version. Instructions for new
committers to learn how to do this are found
[here](http://www.apache.org/dev/contributors.html#svnbasics). However, in the
interest of a fast ramp up, the short version is below. Note that the root of
the SVN repository is
[tomcat/trunk](http://svn.apache.org/repos/asf/tomcat/trunk),
but you can clone specific versions too, such as
[tc8.5.x](http://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk/) or even tags (
[TOMCAT_8_5_15](http://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_15/)).
```
$ svn co http://svn.apache.org/repos/asf/tomcat/trunk/
```
##### Github
For Github, it's almost the same. Chose the major version that you want (for
now they're in different repositories), fork the repository, and then clone
your fork to do that work.
```
$ git clone https://github.com/$USERNAME/tomcat.git
```
#### 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.
* Bugzilla attachment - attach the SVN patch to the Bugzilla issue
* Github PR - after resolving the issue in your local fork and pushing to your
copy of the repository, open a Github PR for review.
* 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:
...@@ -210,7 +210,7 @@ and license terms. Your use of these subcomponents is subject to the terms and ...@@ -210,7 +210,7 @@ and license terms. Your use of these subcomponents is subject to the terms and
conditions of the following licenses. conditions of the following licenses.
For the ecj-x.x.x.jar component: For the Eclipse JDT Core Batch Compiler (ecj-x.x.x.jar) component:
Eclipse Public License - v 1.0 Eclipse Public License - v 1.0
......
Apache Tomcat Apache Tomcat
Copyright 1999-2014 The Apache Software Foundation Copyright 1999-2018 The Apache Software Foundation
This product includes software developed at This product includes software developed at
The Apache Software Foundation (http://www.apache.org/). The Apache Software Foundation (http://www.apache.org/).
...@@ -10,10 +10,10 @@ open source software. The original software and ...@@ -10,10 +10,10 @@ open source software. The original software and
related information is available at related information is available at
http://nsis.sourceforge.net. http://nsis.sourceforge.net.
Java compilation software for JSP pages is provided by Eclipse, Java compilation software for JSP pages is provided by the Eclipse
which is open source software. The original software and JDT Core Batch Compiler component, which is open source software.
related information is available at The original software and related information is available at
http://www.eclipse.org. http://www.eclipse.org/jdt/core/.
For the bayeux implementation For the bayeux implementation
The org.apache.cometd.bayeux API is derivative work originating at the Dojo Foundation The org.apache.cometd.bayeux API is derivative work originating at the Dojo Foundation
......
## 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](http://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](http://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](http://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](http://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.
### The Latest Version
The current latest version in this branch (trunk) can be found on the [Tomcat 9.0](https://tomcat.apache.org/download-90.cgi) page.
### Documentation
The documentation available as of the date of this release is
included in the docs webapp which ships with tomcat. You can access that webapp
by starting tomcat and visiting http://localhost:8080/docs/ in your browser.
The most up-to-date documentation can be found at
http://tomcat.apache.org/tomcat-9.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](http://tomcat.apache.org/lists.html#tomcat-users) email list and
a dedicated [IRC channel](http://tomcat.apache.org/irc.html) (#tomcat on
Freenode).
* If you want freely available support for running Apache Tomcat, please see the
resources page [here](http://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](http://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](http://tomcat.apache.org/bugreport.html).
### Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for more info.
...@@ -98,7 +98,7 @@ Bundled APIs: ...@@ -98,7 +98,7 @@ Bundled APIs:
============= =============
A standard installation of Tomcat @VERSION_MAJOR_MINOR@ makes all of the following APIs available 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"): for use by web applications (by placing them in "lib"):
* annotations-api.jar (Annotations package) * annotations-api.jar (Common Annotations 1.1 package)
* catalina.jar (Tomcat Catalina implementation) * catalina.jar (Tomcat Catalina implementation)
* catalina-ant.jar (Tomcat Catalina Ant tasks) * catalina-ant.jar (Tomcat Catalina Ant tasks)
* catalina-ha.jar (High availability package) * catalina-ha.jar (High availability package)
...@@ -109,21 +109,28 @@ for use by web applications (by placing them in "lib"): ...@@ -109,21 +109,28 @@ for use by web applications (by placing them in "lib"):
* jasper-el.jar (Jasper 2 EL implementation) * jasper-el.jar (Jasper 2 EL implementation)
* jsp-api.jar (JSP 2.2 API) * jsp-api.jar (JSP 2.2 API)
* servlet-api.jar (Servlet 3.0 API) * servlet-api.jar (Servlet 3.0 API)
* tomcat7-websocket.jar (WebSocket 1.0 implementation) * tomcat7-websocket.jar (WebSocket 1.1 implementation)
* tomcat-api.jar (Interfaces shared by Catalina and Jasper) * tomcat-api.jar (Interfaces shared by Catalina and Jasper)
* tomcat-coyote.jar (Tomcat connectors and utility classes) * tomcat-coyote.jar (Tomcat connectors and utility classes)
* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP) * tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP)
* tomcat-jdbc.jar (Tomcat's database connection pooling solution) * tomcat-jdbc.jar (Tomcat's database connection pooling solution)
* tomcat-util.jar (Various utilities) * tomcat-util.jar (Various utilities)
* websocket-api.jar (WebSocket 1.0 API) * websocket-api.jar (WebSocket 1.1 API)
You can make additional APIs available to all of your web applications by You can make additional APIs available to all of your web applications by
putting unpacked classes into a "classes" directory (not created by default), putting unpacked classes into a "classes" directory (not created by default),
or by placing them in JAR files in the "lib" directory. or by placing them in JAR files in the "lib" directory.
To override the XML parser implementation or interfaces, use the endorsed To override the XML parser implementation or interfaces, use the Endorsed
mechanism of the JVM. The default configuration defines JARs located in Standards Override mechanism of the JVM. The default configuration defines
"endorsed" as endorsed. JARs located in "$CATALINA_HOME/endorsed" as endorsed. This mechanism is
no longer supported with Java 9.
When running on Java 6, the Common Annotations 1.0 implementation provided
by the JRE will be used. To use the Common Annotations 1.1 provided by
Tomcat, use the Endorsed Standards Override mechanism of the JVM. The
default configuration defines JARs located in "$CATALINA_HOME/endorsed" as
endorsed.
================================================================ ================================================================
......
...@@ -32,12 +32,27 @@ Running With JRE 6 Or Later ...@@ -32,12 +32,27 @@ Running With JRE 6 Or Later
release version 6 or later, from release version 6 or later, from
http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html
NOTE: Java WebSocket API (JSR-356) is supported only when running
with Java 7 or later.
(1.2) Install the JRE according to the instructions included with the (1.2) Install the JRE according to the instructions included with the
release. release.
You may also use a full Java Development Kit (JDK) rather than just You may also use a full Java Development Kit (JDK) rather than just
a JRE. a JRE.
(1.3) When running on Java 6, the Common Annotations 1.0 implementation
provided by the JRE will be used. To use the Common Annotations 1.1
provided by Tomcat, use the Endorsed Standards Override mechanism
of the JVM. The default configuration defines JARs located in
"$CATALINA_HOME/endorsed" as endorsed.
NOTE: Java 6 includes a subset of Common Annotations 1.0 classes.
The only known difference between versions 1.0 and 1.1 of those
classes is introduction of "lookup" element on Resource annotation.
Majority of web applications will not notice the difference.
(2) Download and Install Apache Tomcat (2) Download and Install Apache Tomcat
...@@ -67,17 +82,15 @@ create your own from the Tomcat source code, as described in ...@@ -67,17 +82,15 @@ create your own from the Tomcat source code, as described in
(3) Configure Environment Variables (3) Configure Environment Variables
Tomcat is a Java application and does not use environment variables. The Tomcat is a Java application and does not use environment variables directly.
variables are used by the Tomcat startup scripts. The scripts use the variables Environment variables are used by the Tomcat startup scripts. The scripts use
to prepare the command that starts Tomcat. the environment variables to prepare the command that starts Tomcat.
(3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional) (3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional)
The CATALINA_HOME environment variable should be set to the location of the The CATALINA_HOME environment variable should be set to the location of the
root directory of the "binary" distribution of Tomcat. root directory of the "binary" distribution of Tomcat.
An example was given in (2.2) above.
The Tomcat startup scripts have some logic to set this variable The Tomcat startup scripts have some logic to set this variable
automatically if it is absent, based on the location of the startup script 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 *nix and on the current directory in Windows. That logic might not work
...@@ -277,6 +290,7 @@ In CATALINA_HOME: ...@@ -277,6 +290,7 @@ In CATALINA_HOME:
* endorsed - Libraries that override standard "Endorsed Standards" * endorsed - Libraries that override standard "Endorsed Standards"
libraries provided by JRE. See Classloading documentation libraries provided by JRE. See Classloading documentation
in the User Guide for details. in the User Guide for details.
No longer supported with Java 9.
By default this "endorsed" directory is absent. By default this "endorsed" directory is absent.
......
...@@ -29,14 +29,14 @@ PATCHES ACCEPTED TO BACKPORT: ...@@ -29,14 +29,14 @@ PATCHES ACCEPTED TO BACKPORT:
PATCHES PROPOSED TO BACKPORT: PATCHES PROPOSED TO BACKPORT:
[ New proposals should be added at the end of the list ] [ New proposals should be added at the end of the list ]
* https://issues.apache.org/bugzilla/show_bug.cgi?id=54330 * https://bz.apache.org/bugzilla/show_bug.cgi?id=54330
Refactor Member interface to reduce dependency on concrete implementation. Refactor Member interface to reduce dependency on concrete implementation.
Based on a patch by Greg Turnquist. Based on a patch by Greg Turnquist.
I have added this to the status file because it changes an interface. I don't I have added this to the status file because it changes an interface. I don't
believe there is any harm in this - the interface isn't really usable prior to believe there is any harm in this - the interface isn't really usable prior to
this patch - but I'd prefer this change to be RTC. this patch - but I'd prefer this change to be RTC.
http://svn.apache.org/viewvc?rev=1430602&view=rev http://svn.apache.org/viewvc?rev=1430602&view=rev
+1: markt +1: markt, fhanik
-1: -1:
* Back-port r1437083 from trunk. * Back-port r1437083 from trunk.
......
...@@ -28,15 +28,7 @@ ...@@ -28,15 +28,7 @@
<typedef resource="org/apache/catalina/ant/catalina.tasks"> <typedef resource="org/apache/catalina/ant/catalina.tasks">
<classpath> <classpath>
<fileset file="${catalina.home}/bin/tomcat-juli.jar"/> <fileset file="${catalina.home}/bin/tomcat-juli.jar"/>
<fileset file="${catalina.home}/lib/tomcat-api.jar"/> <fileset dir="${catalina.home}/lib" includes="*.jar"/>
<fileset file="${catalina.home}/lib/tomcat-util.jar"/>
<fileset file="${catalina.home}/lib/jasper.jar"/>
<fileset file="${catalina.home}/lib/jasper-el.jar"/>
<fileset file="${catalina.home}/lib/el-api.jar"/>
<fileset file="${catalina.home}/lib/jsp-api.jar"/>
<fileset file="${catalina.home}/lib/servlet-api.jar"/>
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
<fileset file="${catalina.home}/lib/tomcat-coyote.jar"/>
</classpath> </classpath>
</typedef> </typedef>
<typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks"> <typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">
......
...@@ -22,6 +22,16 @@ rem ...@@ -22,6 +22,16 @@ rem
rem Do not set the variables in this script. Instead put them into a script 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 setenv.bat in CATALINA_BASE/bin to keep your customizations separate.
rem rem
rem WHEN RUNNING TOMCAT AS A WINDOWS SERVICE:
rem Note that the environment variables that affect the behavior of this
rem script will have no effect at all on Windows Services. As such, any
rem local customizations made in a CATALINA_BASE/bin/setenv.bat script
rem will also have no effect on Tomcat when launched as a Windows Service.
rem The configuration that controls Windows Services is stored in the Windows
rem Registry, and is most conveniently maintained using the "tomcatXw.exe"
rem maintenance utility, where "X" is the major version of Tomcat you are
rem running.
rem
rem CATALINA_HOME May point at your Catalina "build" directory. rem CATALINA_HOME May point at your Catalina "build" directory.
rem rem
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
...@@ -57,6 +67,7 @@ rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories ...@@ -57,6 +67,7 @@ rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
rem containing some jars in order to allow replacement of APIs 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 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 It can also be used to update the XML parser implementation.
rem Note that Java 9 no longer supports this feature.
rem Defaults to $CATALINA_HOME/endorsed. rem Defaults to $CATALINA_HOME/endorsed.
rem rem
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
...@@ -77,6 +88,10 @@ rem ...@@ -77,6 +88,10 @@ rem
rem -agentlib:jdwp=transport=%JPDA_TRANSPORT%, rem -agentlib:jdwp=transport=%JPDA_TRANSPORT%,
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND% rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
rem 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 LOGGING_CONFIG (Optional) Override Tomcat's logging config file
rem Example (all one line) rem Example (all one line)
rem set LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" rem set LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
...@@ -171,17 +186,38 @@ goto juliClasspathDone ...@@ -171,17 +186,38 @@ goto juliClasspathDone
set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar" set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
:juliClasspathDone :juliClasspathDone
if not "%JSSE_OPTS%" == "" goto gotJsseOpts
set JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
:gotJsseOpts
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
if not "%LOGGING_CONFIG%" == "" goto noJuliConfig if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
set LOGGING_CONFIG=-Dnop set LOGGING_CONFIG=-Dnop
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuliConfig :noJuliConfig
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"
if not "%LOGGING_MANAGER%" == "" goto noJuliManager if not "%LOGGING_MANAGER%" == "" goto noJuliManager
set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
:noJuliManager :noJuliManager
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"
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 --------------------------------------- rem ----- Execute The Requested Command ---------------------------------------
...@@ -299,17 +335,17 @@ goto setArgs ...@@ -299,17 +335,17 @@ goto setArgs
rem Execute Java with the applicable properties rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% %_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end goto end
:doSecurity :doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% %_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end goto end
:doJpda :doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% %_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end goto end
:doSecurityJpda :doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% %_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end goto end
:end :end
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
# containing some jars in order to allow replacement of APIs # containing some jars in order to allow replacement of APIs
# created outside of the JCP (i.e. DOM and SAX from W3C). # created outside of the JCP (i.e. DOM and SAX from W3C).
# It can also be used to update the XML parser implementation. # It can also be used to update the XML parser implementation.
# Note that Java 9 no longer supports this feature.
# Defaults to $CATALINA_HOME/endorsed. # Defaults to $CATALINA_HOME/endorsed.
# #
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" # JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
...@@ -82,6 +83,10 @@ ...@@ -82,6 +83,10 @@
# -agentlib:jdwp=transport=$JPDA_TRANSPORT, # -agentlib:jdwp=transport=$JPDA_TRANSPORT,
# address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND # 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 # CATALINA_PID (Optional) Path of the file which should contains the pid
# of the catalina startup java process, when start (fork) is # of the catalina startup java process, when start (fork) is
# used # used
...@@ -93,16 +98,23 @@ ...@@ -93,16 +98,23 @@
# LOGGING_MANAGER (Optional) Override Tomcat's logging manager # LOGGING_MANAGER (Optional) Override Tomcat's logging manager
# Example (all one line) # Example (all one line)
# LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" # LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
#
# 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. # OS specific support. $var _must_ be set to either true or false.
cygwin=false cygwin=false
darwin=false darwin=false
os400=false os400=false
hpux=false
case "`uname`" in case "`uname`" in
CYGWIN*) cygwin=true;; CYGWIN*) cygwin=true;;
Darwin*) darwin=true;; Darwin*) darwin=true;;
OS400*) os400=true;; OS400*) os400=true;;
HP-UX*) hpux=true;;
esac esac
# resolve links - $0 may be a softlink # resolve links - $0 may be a softlink
...@@ -212,8 +224,13 @@ if $cygwin; then ...@@ -212,8 +224,13 @@ if $cygwin; then
CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"` CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"` CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` [ -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 fi
JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS"
# Set juli LogManager config file if it is present and an override has not been issued # Set juli LogManager config file if it is present and an override has not been issued
if [ -z "$LOGGING_CONFIG" ]; then if [ -z "$LOGGING_CONFIG" ]; then
...@@ -229,10 +246,40 @@ if [ -z "$LOGGING_MANAGER" ]; then ...@@ -229,10 +246,40 @@ if [ -z "$LOGGING_MANAGER" ]; then
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
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
# Uncomment the following line to make the umask available when using the # Uncomment the following line to make the umask available when using the
# org.apache.catalina.security.SecurityListener # org.apache.catalina.security.SecurityListener
#JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`" #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 ----------------------------------------- # ----- Execute The Requested Command -----------------------------------------
# Bugzilla 37848: only output this if we have a TTY # Bugzilla 37848: only output this if we have a TTY
...@@ -264,7 +311,7 @@ if [ "$1" = "jpda" ] ; then ...@@ -264,7 +311,7 @@ if [ "$1" = "jpda" ] ; then
if [ -z "$JPDA_OPTS" ]; then if [ -z "$JPDA_OPTS" ]; then
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND" JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
fi fi
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS" CATALINA_OPTS="$JPDA_OPTS $CATALINA_OPTS"
shift shift
fi fi
...@@ -280,7 +327,8 @@ if [ "$1" = "debug" ] ; then ...@@ -280,7 +327,8 @@ if [ "$1" = "debug" ] ; then
fi fi
shift shift
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \ -sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \ -Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
...@@ -290,7 +338,8 @@ if [ "$1" = "debug" ] ; then ...@@ -290,7 +338,8 @@ if [ "$1" = "debug" ] ; then
org.apache.catalina.startup.Bootstrap "$@" start org.apache.catalina.startup.Bootstrap "$@" start
else else
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \ -sourcepath "$CATALINA_HOME"/../../java \
-Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \ -Dcatalina.home="$CATALINA_HOME" \
...@@ -308,7 +357,8 @@ elif [ "$1" = "run" ]; then ...@@ -308,7 +357,8 @@ elif [ "$1" = "run" ]; then
fi fi
shift shift
eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \ -Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \ -Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \
...@@ -317,7 +367,8 @@ elif [ "$1" = "run" ]; then ...@@ -317,7 +367,8 @@ elif [ "$1" = "run" ]; then
org.apache.catalina.startup.Bootstrap "$@" start org.apache.catalina.startup.Bootstrap "$@" start
else else
eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \ -Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
...@@ -335,6 +386,8 @@ elif [ "$1" = "start" ] ; then ...@@ -335,6 +386,8 @@ elif [ "$1" = "start" ] ; then
ps -p $PID >/dev/null 2>&1 ps -p $PID >/dev/null 2>&1
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
echo "Tomcat appears to still be running with PID $PID. Start aborted." 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 exit 1
else else
echo "Removing/clearing stale PID file." echo "Removing/clearing stale PID file."
...@@ -371,8 +424,9 @@ elif [ "$1" = "start" ] ; then ...@@ -371,8 +424,9 @@ elif [ "$1" = "start" ] ; then
echo "Using Security Manager" echo "Using Security Manager"
fi fi
shift shift
eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \ -Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \ -Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \
...@@ -382,8 +436,9 @@ elif [ "$1" = "start" ] ; then ...@@ -382,8 +436,9 @@ elif [ "$1" = "start" ] ; then
>> "$CATALINA_OUT" 2>&1 "&" >> "$CATALINA_OUT" 2>&1 "&"
else else
eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \ -Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
...@@ -422,7 +477,7 @@ elif [ "$1" = "stop" ] ; then ...@@ -422,7 +477,7 @@ elif [ "$1" = "stop" ] ; then
if [ -s "$CATALINA_PID" ]; then if [ -s "$CATALINA_PID" ]; then
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1 kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
echo "PID file found but no matching process was found. Stop aborted." 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 exit 1
fi fi
else else
...@@ -435,7 +490,8 @@ elif [ "$1" = "stop" ] ; then ...@@ -435,7 +490,8 @@ elif [ "$1" = "stop" ] ; then
fi fi
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \ eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \ -Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
...@@ -471,10 +527,12 @@ elif [ "$1" = "stop" ] ; then ...@@ -471,10 +527,12 @@ elif [ "$1" = "stop" ] ; then
sleep 1 sleep 1
fi fi
if [ $SLEEP -eq 0 ]; then if [ $SLEEP -eq 0 ]; then
echo "Tomcat did not stop in time."
if [ $FORCE -eq 0 ]; then if [ $FORCE -eq 0 ]; then
echo "Tomcat did not stop in time. PID file was not removed. To aid diagnostics a thread dump has been written to standard out." echo "PID file was not removed."
kill -3 `cat "$CATALINA_PID"`
fi fi
echo "To aid diagnostics a thread dump has been written to standard out."
kill -3 `cat "$CATALINA_PID"`
fi fi
SLEEP=`expr $SLEEP - 1 ` SLEEP=`expr $SLEEP - 1 `
done done
...@@ -501,8 +559,6 @@ elif [ "$1" = "stop" ] ; then ...@@ -501,8 +559,6 @@ elif [ "$1" = "stop" ] ; then
echo "The PID file could not be removed." echo "The PID file could not be removed."
fi fi
fi fi
# Set this to zero else a warning will be issued about the process still running
KILL_SLEEP_INTERVAL=0
echo "The Tomcat process has been killed." echo "The Tomcat process has been killed."
break break
fi fi
...@@ -511,7 +567,7 @@ elif [ "$1" = "stop" ] ; then ...@@ -511,7 +567,7 @@ elif [ "$1" = "stop" ] ; then
fi fi
KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 ` KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 `
done done
if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then 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." 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
...@@ -521,7 +577,8 @@ elif [ "$1" = "stop" ] ; then ...@@ -521,7 +577,8 @@ elif [ "$1" = "stop" ] ; then
elif [ "$1" = "configtest" ] ; then elif [ "$1" = "configtest" ] ; then
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \ eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \ -Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
......
...@@ -94,6 +94,15 @@ test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat ...@@ -94,6 +94,15 @@ test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat
# #
if [ -z "$JAVA_HOME" ]; then if [ -z "$JAVA_HOME" ]; then
JAVA_BIN="`which java 2>/dev/null || type java 2>&1`" 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 -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd` test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
else else
...@@ -172,6 +181,18 @@ if [ "$cygwin" = "false" ]; then ...@@ -172,6 +181,18 @@ if [ "$cygwin" = "false" ]; then
fi fi
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 ----------------------------------------- # ----- Execute The Requested Command -----------------------------------------
case "$1" in case "$1" in
run ) run )
...@@ -186,7 +207,7 @@ case "$1" in ...@@ -186,7 +207,7 @@ case "$1" in
-errfile "&2" \ -errfile "&2" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \ "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \ -Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \ -Djava.io.tmpdir="$CATALINA_TMP" \
...@@ -203,7 +224,7 @@ case "$1" in ...@@ -203,7 +224,7 @@ case "$1" in
-errfile "&1" \ -errfile "&1" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \ "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \ -Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \ -Djava.io.tmpdir="$CATALINA_TMP" \
...@@ -215,7 +236,7 @@ case "$1" in ...@@ -215,7 +236,7 @@ case "$1" in
-stop \ -stop \
-pidfile "$CATALINA_PID" \ -pidfile "$CATALINA_PID" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \ -Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \ -Djava.io.tmpdir="$CATALINA_TMP" \
......
...@@ -55,9 +55,16 @@ if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome ...@@ -55,9 +55,16 @@ if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome
if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome
goto okJavaHome goto okJavaHome
:gotJdkHome :gotJdkHome
if not exist "%JAVA_HOME%\jre\bin\java.exe" goto noJavaHome
if not exist "%JAVA_HOME%\jre\bin\javaw.exe" goto noJavaHome
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome 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 exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
if not "%JRE_HOME%" == "" goto okJavaHome
set "JRE_HOME=%JAVA_HOME%"
goto okJavaHome
:preJava9Layout
if not exist "%JAVA_HOME%\jre\bin\javaw.exe" goto noJavaHome
if not "%JRE_HOME%" == "" goto okJavaHome if not "%JRE_HOME%" == "" goto okJavaHome
set "JRE_HOME=%JAVA_HOME%\jre" set "JRE_HOME=%JAVA_HOME%\jre"
goto okJavaHome goto okJavaHome
...@@ -77,6 +84,19 @@ rem Set default Service name ...@@ -77,6 +84,19 @@ rem Set default Service name
set SERVICE_NAME=Tomcat@VERSION_MAJOR@ set SERVICE_NAME=Tomcat@VERSION_MAJOR@
set DISPLAYNAME=Apache Tomcat @VERSION_MAJOR_MINOR@ %SERVICE_NAME% set DISPLAYNAME=Apache Tomcat @VERSION_MAJOR_MINOR@ %SERVICE_NAME%
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
if "x%1x" == "xx" goto displayUsage if "x%1x" == "xx" goto displayUsage
set SERVICE_CMD=%1 set SERVICE_CMD=%1
shift shift
...@@ -159,7 +179,8 @@ if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set "CLASSPATH=%CLASSPATH%;%CATALI ...@@ -159,7 +179,8 @@ if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set "CLASSPATH=%CLASSPATH%;%CATALI
--StopClass org.apache.catalina.startup.Bootstrap ^ --StopClass org.apache.catalina.startup.Bootstrap ^
--StartParams start ^ --StartParams start ^
--StopParams stop ^ --StopParams stop ^
--JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.endorsed.dirs=%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" ^ --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" ^
--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" ^
--JvmMs 128 ^ --JvmMs 128 ^
--JvmMx 256 --JvmMx 256
if not errorlevel 1 goto installed if not errorlevel 1 goto installed
......
...@@ -67,7 +67,10 @@ goto exit ...@@ -67,7 +67,10 @@ goto exit
:okJava :okJava
rem Don't override the endorsed dir if the user has set it previously rem Don't override the endorsed dir if the user has set it previously
if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir
rem Set the default -Djava.endorsed.dirs argument rem Java 9 no longer supports the java.endorsed.dirs
rem system property. Only try to use it if
rem CATALINA_HOME/endorsed exists.
if not exist "%CATALINA_HOME%\endorsed" goto gotEndorseddir
set "JAVA_ENDORSED_DIRS=%CATALINA_HOME%\endorsed" set "JAVA_ENDORSED_DIRS=%CATALINA_HOME%\endorsed"
:gotEndorseddir :gotEndorseddir
......
...@@ -79,9 +79,13 @@ fi ...@@ -79,9 +79,13 @@ fi
# Don't override the endorsed dir if the user has set it previously # Don't override the endorsed dir if the user has set it previously
if [ -z "$JAVA_ENDORSED_DIRS" ]; then if [ -z "$JAVA_ENDORSED_DIRS" ]; then
# Set the default -Djava.endorsed.dirs argument # 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 JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
fi fi
fi
# Set standard commands for invoking Java, if not already set. # Set standard commands for invoking Java, if not already set.
if [ -z "$_RUNJAVA" ]; then if [ -z "$_RUNJAVA" ]; then
......
...@@ -36,6 +36,7 @@ rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories ...@@ -36,6 +36,7 @@ rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
rem containing some jars in order to allow replacement of APIs 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 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 It can also be used to update the XML parser implementation.
rem Note that Java 9 no longer supports this feature.
rem Defaults to $CATALINA_HOME/endorsed. rem Defaults to $CATALINA_HOME/endorsed.
rem --------------------------------------------------------------------------- rem ---------------------------------------------------------------------------
...@@ -82,6 +83,19 @@ set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\ ...@@ -82,6 +83,19 @@ set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\
set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 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 rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS= set CMD_LINE_ARGS=
:setArgs :setArgs
...@@ -91,6 +105,6 @@ shift ...@@ -91,6 +105,6 @@ shift
goto setArgs goto setArgs
:doneSetArgs :doneSetArgs
%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% %_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
:end :end
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
# containing some jars in order to allow replacement of APIs # containing some jars in order to allow replacement of APIs
# created outside of the JCP (i.e. DOM and SAX from W3C). # created outside of the JCP (i.e. DOM and SAX from W3C).
# It can also be used to update the XML parser implementation. # It can also be used to update the XML parser implementation.
# Note that Java 9 no longer supports this feature.
# Defaults to $CATALINA_HOME/endorsed. # Defaults to $CATALINA_HOME/endorsed.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -129,11 +130,24 @@ if $cygwin; then ...@@ -129,11 +130,24 @@ if $cygwin; then
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
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
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
# ----- Execute The Requested Command ----------------------------------------- # ----- Execute The Requested Command -----------------------------------------
exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \ exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
-classpath "$CLASSPATH" \
-Dcatalina.home="$CATALINA_HOME" \ -Dcatalina.home="$CATALINA_HOME" \
org.apache.catalina.startup.Tool "$@" org.apache.catalina.startup.Tool "$@"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
# ----- Version Control Flags ----- # ----- Version Control Flags -----
version.major=7 version.major=7
version.minor=0 version.minor=0
version.build=56 version.build=88
version.patch=0 version.patch=0
version.suffix= version.suffix=
...@@ -40,10 +40,16 @@ execute.test.apr=true ...@@ -40,10 +40,16 @@ execute.test.apr=true
test.haltonfailure=false test.haltonfailure=false
# Activate AccessLog during testing # Activate AccessLog during testing
test.accesslog=false test.accesslog=false
# Display the tests output on the console
test.verbose=true
# Note the Cobertura code coverage tool is GPLv2 licensed # Note the Cobertura code coverage tool is GPLv2 licensed
test.cobertura=false test.cobertura=false
# Some platforms (e.g. OSX El Capitan) require IPv4 to be the default for the
# multicast tests to work
java.net.preferIPv4Stack=false
# Location of Java7 JDK # Location of Java7 JDK
#java.7.home=/path/to/java7/jdk #java.7.home=/path/to/java7/jdk
...@@ -57,27 +63,25 @@ trydownload.httpusecaches=true ...@@ -57,27 +63,25 @@ trydownload.httpusecaches=true
# Please note this path must be absolute, not relative, # Please note this path must be absolute, not relative,
# as it is referenced with different working directory # as it is referenced with different working directory
# contexts by the various build scripts. # contexts by the various build scripts.
base.path=/usr/share/java base.path=${user.home}/tomcat-build-libs
#base.path=C:/path/to/the/repository
#base.path=/usr/local
compile.source=1.6 compile.source=1.6
compile.target=1.6 compile.target=1.6
compile.debug=true compile.debug=true
base-apache.loc.1=http://www.apache.org/dist base-apache.loc.1=http://www.apache.org/dyn/closer.lua?action=download&filename=
base-apache.loc.2=http://archive.apache.org/dist base-apache.loc.2=http://archive.apache.org/dist
base-commons.loc.1=${base-apache.loc.1}/commons base-commons.loc.1=${base-apache.loc.1}/commons
base-commons.loc.2=${base-apache.loc.2}/commons base-commons.loc.2=${base-apache.loc.2}/commons
base-tomcat.loc.1=${base-apache.loc.1}/tomcat base-tomcat.loc.1=${base-apache.loc.1}/tomcat
base-tomcat.loc.2=${base-apache.loc.2}/tomcat base-tomcat.loc.2=${base-apache.loc.2}/tomcat
base-sf.loc=http://downloads.sourceforge.net base-sf.loc=https://downloads.sourceforge.net
# repo.maven.apache.org is the same as repo2.maven.org # repo.maven.apache.org is the same as repo2.maven.org
base-maven.loc=http://repo.maven.apache.org/maven2 base-maven.loc=https://repo.maven.apache.org/maven2
# Mirror, was used when there were problems with the main SF downloads site # Mirror, was used when there were problems with the main SF downloads site
# base-sf.loc=http://sunet.dl.sourceforge.net # base-sf.loc=https://sunet.dl.sourceforge.net
# ----- Commons Logging, version 1.1 or later ----- # ----- Commons Logging, version 1.1 or later -----
# If this version is updated, check the versions required for the dependencies below # If this version is updated, check the versions required for the dependencies below
...@@ -129,8 +133,8 @@ wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar ...@@ -129,8 +133,8 @@ wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar
# ----- Eclipse JDT, version 4.4 or later -----# # ----- Eclipse JDT, version 4.4 or later -----#
# See https://wiki.apache.org/tomcat/JDTCoreBatchCompiler before updating # See https://wiki.apache.org/tomcat/JDTCoreBatchCompiler before updating
jdt.version=4.4 jdt.version=4.4.2
jdt.release=R-4.4-201406061215 jdt.release=R-4.4.2-201502041700
jdt.home=${base.path}/ecj-${jdt.version} jdt.home=${base.path}/ecj-${jdt.version}
jdt.jar=${jdt.home}/ecj-${jdt.version}.jar 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. # The download will be moved to the archive area eventually. We are taking care of that in advance.
...@@ -138,11 +142,9 @@ jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj ...@@ -138,11 +142,9 @@ jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
jdt.loc.2=http://download.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 library -----
tomcat-native.version=1.1.31 tomcat-native.version=1.2.16
tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version} tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
# Required due to packaging error in 1.1.31 - remove once fixed
tomcat-native.win.path=tomcat-native-${tomcat-native.version}-win32-bin
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.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.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}-win32-bin.zip tomcat-native.win.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-win32-bin.zip
...@@ -160,16 +162,20 @@ commons-pool.home=${base.path}/commons-pool-${commons-pool.version}-src ...@@ -160,16 +162,20 @@ commons-pool.home=${base.path}/commons-pool-${commons-pool.version}-src
commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz
commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz
# ----- NSIS, version 2.0 or later ----- # ----- NSIS, version 3.0 or later -----
nsis.home=${base.path}/nsis-2.46 nsis.version=3.03
nsis.home=${base.path}/nsis-${nsis.version}
nsis.exe=${nsis.home}/makensis.exe nsis.exe=${nsis.home}/makensis.exe
nsis.installoptions.dll=${nsis.home}/Plugins/InstallOptions.dll nsis.arch.dir=x86-unicode/
nsis.nsexec.dll=${nsis.home}/Plugins/nsExec.dll nsis.installoptions.dll=${nsis.home}/Plugins/${nsis.arch.dir}InstallOptions.dll
nsis.nsisdl.dll=${nsis.home}/Plugins/NSISdl.dll nsis.nsexec.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsExec.dll
nsis.loc=${base-sf.loc}/nsis/nsis-2.46.zip nsis.nsisdl.dll=${nsis.home}/Plugins/${nsis.arch.dir}NSISdl.dll
nsis.system.dll=${nsis.home}/Plugins/${nsis.arch.dir}System.dll
# ----- Commons Daemon, version 1.0-Alpha or later ----- nsis.nsdialogs.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsDialogs.dll
commons-daemon.version=1.0.15 nsis.loc=${base-sf.loc}/nsis/nsis-${nsis.version}.zip
# ----- Commons Daemon, version 1.1.0 or later -----
commons-daemon.version=1.1.0
commons-daemon.home=${base.path}/commons-daemon-${commons-daemon.version} commons-daemon.home=${base.path}/commons-daemon-${commons-daemon.version}
commons-daemon.jar=${commons-daemon.home}/commons-daemon-${commons-daemon.version}.jar 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.home=${commons-daemon.home}/windows
...@@ -180,8 +186,8 @@ commons-daemon.bin.loc.1=${base-commons.loc.1}/daemon/binaries/commons-daemon-${ ...@@ -180,8 +186,8 @@ commons-daemon.bin.loc.1=${base-commons.loc.1}/daemon/binaries/commons-daemon-${
commons-daemon.bin.loc.2=${base-commons.loc.2}/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.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.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-signed.zip 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-signed.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 Unit Test Suite, version 4.11 or later -----
junit.version=4.11 junit.version=4.11
...@@ -195,10 +201,29 @@ hamcrest.home=${base.path}/hamcrest-${hamcrest.version} ...@@ -195,10 +201,29 @@ hamcrest.home=${base.path}/hamcrest-${hamcrest.version}
hamcrest.jar=${hamcrest.home}/hamcrest-core-${hamcrest.version}.jar 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 hamcrest.loc=${base-maven.loc}/org/hamcrest/hamcrest-core/${hamcrest.version}/hamcrest-core-${hamcrest.version}.jar
# ----- Checkstyle, version 5.1 or later ----- # ----- EasyMock, version 3.2 or later -----
checkstyle.version=5.7 easymock.version=3.2
easymock.home=${base.path}/easymock-${easymock.version}
easymock.loc=${base-sf.loc}/easymock/easymock-${easymock.version}.zip
easymock.jar=${easymock.home}/easymock-${easymock.version}.jar
# ----- cglib, used by EasyMock, version 2.2 or later -----
cglib.version=2.2.3
cglib.home=${base.path}/cglib-${cglib.version}
cglib.loc=${base-sf.loc}/cglib/cglib-nodep-${cglib.version}.jar
cglib.jar=${cglib.home}/cglib-nodep-${cglib.version}.jar
# ----- objenesis, used by EasyMock, version 1.2 or later -----
objenesis.version=1.2
objenesis.home=${base.path}/objenesis-${objenesis.version}
objenesis.loc=https://bintray.com/easymock/distributions/download_file?file_path=objenesis-${objenesis.version}-bin.zip
objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar
# ----- Checkstyle, version 6.0 or later -----
# Limited to 6.1.1 since that is the latest release that supports Java 6
checkstyle.version=6.1.1
checkstyle.home=${base.path}/checkstyle-${checkstyle.version} checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-bin.zip checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
# ----- JSON Libraries (for bayeux module) ----- # ----- JSON Libraries (for bayeux module) -----
......
This diff is collapsed.