Browse Source

New upstream version 8.5.8

tags/upstream/8.5.8^0
Emmanuel Bourg 5 years ago
parent
commit
d8d9950612
100 changed files with 1812 additions and 1855 deletions
  1. +62
    -36
      BUILDING.txt
  2. +0
    -60
      KEYS
  3. +4
    -0
      LICENSE
  4. +12
    -6
      NOTICE
  5. +8
    -3
      RELEASE-NOTES
  6. +0
    -6
      RUNNING.txt
  7. +0
    -224
      TOMCAT-NEXT.txt
  8. +1
    -1
      bin/catalina-tasks.xml
  9. +4
    -10
      bin/catalina.bat
  10. +17
    -16
      bin/catalina.sh
  11. +0
    -3
      bin/daemon.sh
  12. +1
    -1
      bin/service.bat
  13. +2
    -8
      bin/setclasspath.bat
  14. +2
    -9
      bin/setclasspath.sh
  15. +1
    -7
      bin/tool-wrapper.bat
  16. +1
    -8
      bin/tool-wrapper.sh
  17. +3
    -52
      build.properties.default
  18. +76
    -259
      build.xml
  19. +4
    -3
      conf/catalina.policy
  20. +3
    -1
      conf/catalina.properties
  21. +1
    -7
      conf/context.xml
  22. +6
    -15
      conf/jaspic-providers.xml
  23. +53
    -0
      conf/jaspic-providers.xsd
  24. +6
    -0
      conf/logging.properties
  25. +28
    -8
      conf/server.xml
  26. +1
    -1
      conf/tomcat-users.xml
  27. +1
    -1
      conf/tomcat-users.xsd
  28. +1
    -4
      conf/web.xml
  29. +5
    -12
      java/javax/el/ArrayELResolver.java
  30. +6
    -15
      java/javax/el/BeanELResolver.java
  31. +5
    -16
      java/javax/el/BeanNameELResolver.java
  32. +3
    -4
      java/javax/el/CompositeELResolver.java
  33. +4
    -6
      java/javax/el/ELContext.java
  34. +2
    -3
      java/javax/el/LambdaExpression.java
  35. +5
    -12
      java/javax/el/ListELResolver.java
  36. +5
    -12
      java/javax/el/MapELResolver.java
  37. +5
    -13
      java/javax/el/ResourceBundleELResolver.java
  38. +6
    -18
      java/javax/el/StaticFieldELResolver.java
  39. +30
    -0
      java/javax/security/auth/message/AuthException.java
  40. +37
    -0
      java/javax/security/auth/message/AuthStatus.java
  41. +30
    -0
      java/javax/security/auth/message/ClientAuth.java
  42. +33
    -0
      java/javax/security/auth/message/MessageInfo.java
  43. +85
    -0
      java/javax/security/auth/message/MessagePolicy.java
  44. +29
    -0
      java/javax/security/auth/message/ServerAuth.java
  45. +57
    -0
      java/javax/security/auth/message/callback/CallerPrincipalCallback.java
  46. +41
    -0
      java/javax/security/auth/message/callback/CertStoreCallback.java
  47. +43
    -0
      java/javax/security/auth/message/callback/GroupPrincipalCallback.java
  48. +65
    -0
      java/javax/security/auth/message/callback/PasswordValidationCallback.java
  49. +123
    -0
      java/javax/security/auth/message/callback/PrivateKeyCallback.java
  50. +62
    -0
      java/javax/security/auth/message/callback/SecretKeyCallback.java
  51. +38
    -0
      java/javax/security/auth/message/callback/TrustStoreCallback.java
  52. +32
    -0
      java/javax/security/auth/message/config/AuthConfig.java
  53. +149
    -0
      java/javax/security/auth/message/config/AuthConfigFactory.java
  54. +31
    -0
      java/javax/security/auth/message/config/AuthConfigProvider.java
  55. +29
    -0
      java/javax/security/auth/message/config/ClientAuthConfig.java
  56. +22
    -0
      java/javax/security/auth/message/config/ClientAuthContext.java
  57. +5
    -5
      java/javax/security/auth/message/config/RegistrationListener.java
  58. +29
    -0
      java/javax/security/auth/message/config/ServerAuthConfig.java
  59. +22
    -0
      java/javax/security/auth/message/config/ServerAuthContext.java
  60. +34
    -0
      java/javax/security/auth/message/module/ClientAuthModule.java
  61. +34
    -0
      java/javax/security/auth/message/module/ServerAuthModule.java
  62. +7
    -20
      java/javax/servlet/http/Cookie.java
  63. +0
    -1
      java/javax/servlet/http/HttpSessionListener.java
  64. +7
    -20
      java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
  65. +5
    -12
      java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
  66. +2
    -2
      java/javax/websocket/WebSocketContainer.java
  67. +1
    -0
      java/org/apache/catalina/AccessLog.java
  68. +120
    -95
      java/org/apache/catalina/Context.java
  69. +3
    -11
      java/org/apache/catalina/Engine.java
  70. +4
    -1
      java/org/apache/catalina/Executor.java
  71. +0
    -43
      java/org/apache/catalina/Globals.java
  72. +8
    -12
      java/org/apache/catalina/Group.java
  73. +20
    -16
      java/org/apache/catalina/Host.java
  74. +0
    -397
      java/org/apache/catalina/InstanceEvent.java
  75. +5
    -2
      java/org/apache/catalina/JmxEnabled.java
  76. +6
    -29
      java/org/apache/catalina/LifecycleEvent.java
  77. +4
    -24
      java/org/apache/catalina/LifecycleState.java
  78. +21
    -111
      java/org/apache/catalina/Manager.java
  79. +8
    -0
      java/org/apache/catalina/Realm.java
  80. +2
    -17
      java/org/apache/catalina/Service.java
  81. +24
    -18
      java/org/apache/catalina/Session.java
  82. +3
    -6
      java/org/apache/catalina/SessionEvent.java
  83. +5
    -2
      java/org/apache/catalina/SessionIdGenerator.java
  84. +6
    -3
      java/org/apache/catalina/Store.java
  85. +1
    -1
      java/org/apache/catalina/StoreManager.java
  86. +2
    -2
      java/org/apache/catalina/TomcatPrincipal.java
  87. +8
    -6
      java/org/apache/catalina/User.java
  88. +10
    -7
      java/org/apache/catalina/UserDatabase.java
  89. +1
    -23
      java/org/apache/catalina/Valve.java
  90. +23
    -19
      java/org/apache/catalina/WebResource.java
  91. +23
    -6
      java/org/apache/catalina/WebResourceRoot.java
  92. +2
    -0
      java/org/apache/catalina/WebResourceSet.java
  93. +45
    -49
      java/org/apache/catalina/Wrapper.java
  94. +2
    -0
      java/org/apache/catalina/ant/AbstractCatalinaCommandTask.java
  95. +7
    -2
      java/org/apache/catalina/ant/BaseRedirectorHelperTask.java
  96. +5
    -0
      java/org/apache/catalina/ant/FindLeaksTask.java
  97. +1
    -1
      java/org/apache/catalina/ant/ValidatorTask.java
  98. +2
    -2
      java/org/apache/catalina/ant/jmx/JMXAccessorConditionBase.java
  99. +8
    -17
      java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
  100. +7
    -13
      java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java

+ 62
- 36
BUILDING.txt View File

@@ -20,8 +20,8 @@
====================================================

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 and WebSocket 1.1 specifications
from the Java Community Process <http://www.jcp.org/>.
implements the Servlet 3.1, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1
specifications from the Java Community Process <http://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.
@@ -35,7 +35,7 @@ source distribution, do the following:

1. If the JDK is already installed, skip to (2).

2. Download a version 7 of Java Development Kit (JDK) release (use the
2. Download a version 8 of Java Development Kit (JDK) release (use the
latest update available for your chosen version) from one of:

http://www.oracle.com/technetwork/java/javase/downloads/index.html
@@ -66,8 +66,8 @@ source distribution, do the following:

(2) Install Apache Ant version 1.9.5 or later on your computer.

1. If Apache Ant version 1.9.5 or later is already installed on your computer,
skip to (3).
1. If Apache Ant version 1.9.5 or later is already installed on your
computer, skip to (3).

2. Download a binary distribution of Ant from:

@@ -318,15 +318,14 @@ directory:

output/build/logs

By default the testsuite is run four times to test 4 different
implementations of Tomcat connectors: BIO, NIO, NIO2 and APR. (If you are not
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 4 runs are enabled and disabled individually by the following
The 3 runs are enabled and disabled individually by the following
properties, which all are "true" by default:

execute.test.bio=true
execute.test.nio=true
execute.test.nio2=true
execute.test.apr=true
@@ -423,57 +422,62 @@ For example:

junit.formatter.usefile=false

5. Optional support is provided for the Cobertura code coverage tool. It
can be enabled using the following property:
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 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 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

* 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.

6. The performance tests are written to run reasonably powerful machines (such
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 ina virtual machine) so the performance tests may be
disabled by using the following property:
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.
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

8. It is known that some platforms (e.g. OSX El Capitan) require IPv4 to
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

9. Optional support is provided for FindBugs. It can be enabled using the
following property:

execute.findbugs=true

The report file by default is written to

output/findbugs

* NOTE: Findbugs is licensed under LGPL. Using Findbugs during Tomcat build is
optional and is off by default.

(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.
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.
@@ -490,14 +494,36 @@ is located in the following directory:

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:

cd ${tomcat.source}
ant -Dexecute.validate=true validate


(8.2) End-of-line conventions check
(8.2) FindBugs

NOTE: FindBugs is licensed under LGPL. Using Findbugs during Tomcat build is
optional and is off by default.

See http://findbugs.sourceforge.net/ 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.



+ 0
- 60
KEYS View File

@@ -614,63 +614,3 @@ QCuUl/v3Zly66jThcNS/U6S9VXBtQRxDZtkL8pSzmJxaFvvnZgkQ/hlvJ8f9ccS7
2/KQU94=
=yvcP
-----END PGP PUBLIC KEY BLOCK-----

pub 4096R/D63011C7 2013-09-19
Key fingerprint = 713D A88B E509 1153 5FE7 16F5 208B 0AB1 D630 11C7
uid Violeta Georgieva Georgieva (CODE SIGNING KEY) <violetagg@apache.org>
sig 3 D63011C7 2013-09-19 Violeta Georgieva Georgieva (CODE SIGNING KEY) <violetagg@apache.org>
sub 4096R/30480593 2013-09-19
sig D63011C7 2013-09-19 Violeta Georgieva Georgieva (CODE SIGNING KEY) <violetagg@apache.org>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.21 (MingW32)

mQINBFI6WiwBEAD+kkswnsY8eaqvYkS+ZB5MJr7juWrv9Lw9OGsIXFlTvD1XK01c
E8k4+uA2sOtaXQ5wTMdc5N3YzAXqFxplWuafQgEvhyTTq37M5YCxvtYEZy/EHQYT
iok5H97lMRKbhLdZB+wkdsa0P/L1FveCUiEawKY/Rrfi+UeRAneSV+m7S+RrPphZ
M9aNSczqYKfAqlpUAlUcrF/bt59vjhepoHcE4ev6SB+PCs0vbvX4iTvvZCTk1lZ9
InS2wdK80Jz9pRB0Uf3LEnZxt9e3RkIFdQOCcEISmNlBKQQKFG+zCpIAbVoMLKEw
rXWl8mLzGzBbhGmLpFroem3Ln1YiAxUqnPR/MoBquYnpTINwePgwKVWyQ1TXG2MF
Z7DPayBMN+G51rfLS/8iy35pAnNeqbWQjavdUis6/0aRMv5EYMFMAerutQ5v99bA
rGj6OL3R6repJLOGT4YWcD/Tw+eU1lMWxbq8BbbRU9Fd0iVFhFyKB/DQSxofvTCe
PdWXRrptrE0/SmvuoTRVPmB21WyJenKdNmVOQ6U+W1Rs+5IKAdWWrGPcUt0qTrRC
SL8vAQ7MejYLovFtRHslJRs7T3ratpRcQUNOx1jytJhmSUJktNWZWNHqBTe/eOAU
Yr+QAkQVQXvRVWzHkDHQRTOFmNYIDZYRkzSP19sBWRnYdCs6CbIVPgMJVwARAQAB
tEVWaW9sZXRhIEdlb3JnaWV2YSBHZW9yZ2lldmEgKENPREUgU0lHTklORyBLRVkp
IDx2aW9sZXRhZ2dAYXBhY2hlLm9yZz6JAjcEEwEKACEFAlI6WiwCGwMFCwkIBwMF
FQoJCAsFFgIDAQACHgECF4AACgkQIIsKsdYwEccMXA/+KMQKWfw2T2CXLhqvQLoh
Irj1Vi9leAttKqKp2NCHLK1jf1qKzUx5U81VvizIGUsDXGlAvnnavrj+hmQqZdsO
CoJAo7ViIR1ZhNca1tFK4Sy03wdpNyUkvxVuC+3peXmwhjPJoqU2ONCuDl/bCczl
QAQpgZCMO93h45U9H6JkjqK01aDorQHxvXo+Ap2IViQvDkNtJ515vG2k5K+x2XHw
Tv19wr5N2rz407TWKzS5hh7QHRgg+PZs/zPf1YHD7Tg5K6vvmZd+5EsDrse6tZXy
mzz2+8Yg1SNa765Aq6p1uAQf5NKeej/25TbRYT7RyIlgDXPcPrKxy0cKzpqFqCFs
jJEcN3NlQq+f1tOvUk8cQQS0G+Qws3EU7I74z8KaUfqmO/5ROrXLS50cKC9CODO0
UFY8FbJDGzS5cFSBlqXYLeQvaOMg0LsV6wZLu6brxEsRYjSpwM8yBFO4bMcTxt4P
VYtinNZ+6ude8mMz6BK/0/XbAL6rc5jwO2xj7GTCFNRTWOa8IGtwqg3qnAiHcg/V
bTBQCOmzMujHBXLnZu6vg79BwzE7Ikq634D6HEwi1bC3XuVz+7NqdUQAGPSapwUo
+0wC5DVwdjhe1zWcf2Zc45HWsx0HaGW28x/tBrw78fgwrSSyV2xunbxGpVaaysTy
Oini8V70uLofn1SHtxvEQCm5Ag0EUjpaLAEQAKV7FnaAcxkzDa7zjrAgLRho44KM
+lBt28+5KO3Jye1Lpf2+4aspu0PXkGW2Twv2tBQNZYs2CWF+vnHNUDuU8TkSpPt+
2PRSZrQ0K+IpQF/qY3Wf+LYWFNXk5/wHJLGiQv/008svtupng6Ov39JwCNQ1iG3d
nSWfnqHwQULyE7JcZf1It94G43+6NBvKakstOdK7d40dVhmRIKDdJkWhN3MKrGab
FGFAF2Nb57IugQ9QO6Ve/BnjKZmJg7TyUZk27LVTC0aUQgGgDOvsF2Iw95IplCZ/
jVbwdBGjeCStvI3c0DB+E2xwJ0g2Wf/CBLvmU9GKOW0toBfRUXFbfzNTJfW8kglt
pDuELsVY5vHHxgujdDInHuTW1930zUw0cNA2+ai3sf+UGejh0e3nGfy1uOK3YQ6H
2YWgqXlOkri9pMlE0NJo/3PW9QDu0YRplGl65k+GtHD2La1akq5V5Et0VNaOypBP
OqnUM08LofAS126Kerm7uBSUQDDV6t1VTOBgPW5cJF9I8kdp04pzj4qb/3fuOuGc
kBRfmO/Vkug8U81w/TnxX6EYGy5fyA4JFBJl++waPS/9dXhVnA0qXEivzw9gNQvC
uXYcM3nm4yUrOouC/OlC1cS+6Wxjrx6qn3NnsVzMCtefNK93+TdheZ0cJrMhJKkW
v+qttOzPIleqvDK9ABEBAAGJAh8EGAEKAAkFAlI6WiwCGwwACgkQIIsKsdYwEcdN
tQ/+L8cw9Z9tfrqovO1fGFQwCSaomShsbjoUb5AR3Hj3OuPGwXd8J62mrw+RnGN+
0w2RyTz52izYvcoB1jmMFQwqi7vM5KCbw6KA8oRX58WSqiWCIwpbUuTODvJrSXjX
pz/J/d+PVZi8T1HAu5HxDqNC1XR+eUd1xA9Pgnmmw99+0rmzES7xexWADXo/RRPH
mDCxGK3UKMHDYJLTx8D3MacMitzQulxVo9xWwH1C7ioL3o5zCv2mfIl32WNjqwpD
h4gNpnAGRthizeYTgyJM9nCrSWgeE+izGZ9F0g5uXzhyk1f6jlUmXiwjMu/XOcJO
5Rr1e42bWITuP49nB2QbdSqVvVscwCd5TEpOnQtVNZGsss/wQHXDmGSVrYYUQwO/
cUrU+hTti1IJXgyFi7F1oxde+LCUxXmizKGoY96dVN+TYH5c17ub1/4/DYpOmcly
tsQ2TOV0BqK4rgKLGfg2mA4zIFOdqXeGefLQVAF5fFzjFKKDi0ewp3sqy+ed6mKY
1M/HmRX/YzIouFZ3ChFPIpeY23XxJC0BXkWR4pS7qxnelrWBZ+UbleNr9uHat5rC
B77712dCT9zz85b380DnuMkrgz4HCnHuTcbHXIF1J604lars6ZrjtBvX+OsRHt7V
f72qKJufP+n01xliW68LP4v93auM8nuE4kkEJ8ncHyuDq/Q=
=fM0q
-----END PGP PUBLIC KEY BLOCK-----

+ 4
- 0
LICENSE View File

@@ -725,6 +725,10 @@ For the following XML Schemas for Java EE Deployment Descriptors:
- web-app_3_1.xsd
- web-common_3_1.xsd
- web-fragment_3_1.xsd
- javaee_8.xsd
- web-app_4_0.xsd
- web-common_4_0.xsd
- web-fragment_4_0.xsd

COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0



+ 12
- 6
NOTICE View File

@@ -4,6 +4,12 @@ Copyright 1999-2016 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This software contains code derived from netty-native
developed by the Netty project
(http://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
@@ -15,12 +21,12 @@ JDT Core Batch Compiler component, which is open source software.
The original software and related information is available at
http://www.eclipse.org/jdt/core/.

For the bayeux implementation
The org.apache.cometd.bayeux API is derivative work originating at the Dojo Foundation
* Copyright 2007-2008 Guy Molinari
* Copyright 2007-2008 Filip Hanik
* Copyright 2007 Dojo Foundation
* Copyright 2007 Mort Bay Consulting Pty. Ltd.
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


+ 8
- 3
RELEASE-NOTES View File

@@ -57,6 +57,11 @@ removed or changed although it may be deprecated.
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.

@@ -91,9 +96,9 @@ 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 endorsed
mechanism of the JVM. The default configuration defines JARs located in
"endorsed" as endorsed.
To override the XML parser implementation or interfaces, use the appropriate
feature for your JVM. For Java <= 8 use the endorsed standards override
feature. For Java 9+ use the upgradeable modules feature.


================================================================


+ 0
- 6
RUNNING.txt View File

@@ -272,12 +272,6 @@ In CATALINA_HOME:

* 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.

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


+ 0
- 224
TOMCAT-NEXT.txt View File

@@ -1,224 +0,0 @@
================================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================================================

Notes of things to consider for the next major Tomcat release (probably 8.0.x
but possibly 7.1.x).

1. Refactor the TLD parsing. TLDs are currently parsed twice. Once by Catalina
looking for listeners and once by Jasper.
- Complete

2. Refactor the XML parsing (org.apache.tomcat.util.xml ?) to remove duplicate
XML parsing code in Catalina and Jasper such as the entity resolvers used
for validation.
- Complete

3. TLDs may have a many to many relationship between URIs and TLD files. This
can result in the same TLD file being parsed many times. Refactor the
TldLocationCache to cache the parsed nodes (will need to check for changes
to TLD files).
- Complete

4. TLD files should be included in the dependencies for JSP and Tag files.
- Complete

5. Run the unused code detector and remove everything that isn't currently used.
Add deprecation markers for the removed code to Tomcat 7.0.x
- Complete

6. Change the default URIEncoding on the connector to UTF-8.
- Complete

7. Rip out all the JNDI code in resource handling and replace it with straight
URLs (File or WAR).
- Complete

kkolinko: I think this proposal goes too far. There are several
separate issues. There are:

a) Internal API to define resources
- BaseDirContext implementing aliases and resource jars,
and there will be overlays in Servlet 3.1
- StandardContext.setResources() allowing an arbitrary DirContext
implementation via <Resources> element.

Concerns:
- Too many ways to configure it.

b) Internal API to lookup resources
- DirContext interface

Concerns:
- Unnecessary objects, e.g. NamingException instead of null.

- Too many methods. Name vs. String. list() vs. listBindings().

- Limited API. As a workaround, there are non-standard methods that
are implemented on BaseDirContext instead, e.g. getRealPath(),
doListBindings(..).

- All caching (ProxyDirContext) and aliases handling is
performed on the root level only.

Once I do a lookup that returns a DirContext, further lookups on it
will bypass the caching and aliases.

c) WebappClassLoader and its interaction with resources

WebappClassLoader uses DirContext API to access resources (classes,
jars).

Note that it has to construct a classpath for Java compiler called by
Jasper. The compiler cannot operate on a DirContext and needs access
to actual files and JARs.

Concerns:
- There are problems with access to classes and JAR files in
non-unpacked WARs.

It is resolved by unzipping the files into the working directory (in
WebappLoader#setRepositories()).

Note that DirContext is not notified of this copying.
StandardJarScanner does not know of those copies either.

- There are problems when the classes directory is served from
multiple locations

It seems to be worked around by adding the path of the alternative
classes directory to virtualClasspath of VirtualWebappLoader (as shown
by example in config/context.html#Virtual_webapp), but it is likely
that I miss something.

- antiJARLocking support in WebappClassLoader creates copies of
resources, but does not notify the DirContext.

- WebappClassLoader.jarFiles is used to track JAR files and keep them
open. These might be useful when looking for resources in those files.
These might be useful for StandardJarScanner.

d) StandardJarScanner

Concerns:
- It essentially scans the same JARs as accessed by WebappClassLoader.

It might be better to access them via WebappClassLoader rather that
through Servlet API methods.

The scanner is used by Jasper as well, so there are some concerns to
keep the components independent.

e) URL returned by ServletContext.getResource()
jndi:/hostName/contextPath/resourcePath

Goodies:
- Uniform URL space. Both files and directories can be represented,
hiding details of aliases, resource jars, etc.

- It hides implementation details.

- Permissions can be expressed as JndiPermission. They do not depend
on context version number.

- Accessing a resource through such URL leverages the cache
implemented in ProxyDirContext class. We do not access the file system
directly, nor need to open a JAR file.

- It can be created from a String if necessary.

Such use relies on DirContextURLStreamHandler.bindThread(..) being
called earlier in the same thread.

Concerns:
- Some components would like to get "real" resource URL from this one.

Maybe it can be exposed through some special header name,
DirContextURLConnection.getHeaderField(str)?

How such real URL can be prepared?
DirContext.getNameInNamespace()?
BaseDirContext.getRealPath()?
((FileResourceAttributes)DirContext.getAttributes()).getCanonicalPath()?

- A resource lookup is performed twice. The first time in
ServletContext.getResource() (implemented in ApplicationContext.getResource())
to return null for non-existing paths.
The second time in DirContextURLConnection.connect().

It is good that there is a cache in ProxyDirContext that saves time
for repeated lookups.

- Using URLs involves encoding/decoding.

If there were some other API to access resources in a web application,
I would prefer some opaque object that allows access to resource
properties, but is converted to string/url form only on demand.

f) Connection, created from jndi: URL
DirContextURLStreamHandler, DirContextURLConnection

Goodies:
- DirContextURLConnection provides information about resource via
methods such as getContentLength(), getHeaderField(str).

Concerns:
- It exposes DirContext through some APIs, such as
DirContextURLConnection.getContent().

Is this feature going to be preserved for compatibility, or to be
removed?

- DirContextURLConnection.list(): a public method, that is not part of
the usual URL API. So URL API is lacking. Maybe some other methods
could be added.

A possible candidate could be "isCollection()", instead of asking for
getContentType() and checking its value against ResourceAttributes.COLLECTION_TYPE.

Threads:
http://markmail.org/thread/hqbmdn2qs6xcooko

8. Review the connector shutdown code for timing and threading issues
particularly any that may result in a client socket being left open after a
connector.stop().
- Complete.

9. Remove the svn keywords from all the files. (Just Java files?)
- Complete.

10. Code to the interfaces in the o.a.catalina package and avoid coding directly
to implementations in other packages. This is likely to require a lot of
work. Maybe use Structure 101 (or similar) to help.
- Partially complete - probably as far as is practical.

11. Merge Service and Engine
- Decided not to do this.

12. Java 7 updates
- Use of <> operator where possible
- Complete
- Use of try with resources
- Complete
- Catching multiple exceptions
- Started
- javax.[annotation to el] complete
- remainder TODO

13. Fix all FindBugs warnings
- Complete

14. Review date formatting with a view to reducing duplication.

+ 1
- 1
bin/catalina-tasks.xml View File

@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?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


+ 4
- 10
bin/catalina.bat View File

@@ -63,12 +63,6 @@ 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 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
@@ -339,17 +333,17 @@ goto setArgs
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
%_EXECJAVA% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -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

+ 17
- 16
bin/catalina.sh View File

@@ -58,12 +58,6 @@
# 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.
# Defaults to $CATALINA_HOME/endorsed.
#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
# command is executed. The default is "dt_socket".
#
@@ -98,6 +92,8 @@
# 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
@@ -237,7 +233,6 @@ if $cygwin; then
CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
fi

if [ -z "$JSSE_OPTS" ] ; then
@@ -263,6 +258,12 @@ 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

# Uncomment the following line to make the umask available when using the
# org.apache.catalina.security.SecurityListener
#JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
@@ -326,7 +327,7 @@ if [ "$1" = "debug" ] ; then
fi
shift
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
@@ -336,7 +337,7 @@ if [ "$1" = "debug" ] ; then
org.apache.catalina.startup.Bootstrap "$@" start
else
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
@@ -354,7 +355,7 @@ elif [ "$1" = "run" ]; then
fi
shift
eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
@@ -363,7 +364,7 @@ elif [ "$1" = "run" ]; then
org.apache.catalina.startup.Bootstrap "$@" start
else
eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -420,7 +421,7 @@ elif [ "$1" = "start" ] ; then
fi
shift
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
@@ -431,7 +432,7 @@ elif [ "$1" = "start" ] ; then

else
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -482,8 +483,8 @@ elif [ "$1" = "stop" ] ; then
fi
fi

eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
eval "\"$_RUNJAVA\"" $JAVA_OPTS \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -569,7 +570,7 @@ elif [ "$1" = "stop" ] ; then
elif [ "$1" = "configtest" ] ; then

eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \


+ 0
- 3
bin/daemon.sh View File

@@ -186,7 +186,6 @@ case "$1" in
-errfile "&2" \
-classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \
@@ -203,7 +202,6 @@ case "$1" in
-errfile "&1" \
-classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \
@@ -215,7 +213,6 @@ case "$1" in
-stop \
-pidfile "$CATALINA_PID" \
-classpath "$CLASSPATH" \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \


+ 1
- 1
bin/service.bat View File

@@ -159,7 +159,7 @@ if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set "CLASSPATH=%CLASSPATH%;%CATALI
--StopClass org.apache.catalina.startup.Bootstrap ^
--StartParams start ^
--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%;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" ^
--JvmMs 128 ^
--JvmMx 256
if not errorlevel 1 goto installed


+ 2
- 8
bin/setclasspath.bat View File

@@ -15,9 +15,8 @@ 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 Set JAVA_HOME or JRE_HOME if not already set and ensure any provided
rem settings are valid and consistent with the selected start-up options.
rem ---------------------------------------------------------------------------

rem Make sure prerequisite environment variables are set
@@ -65,11 +64,6 @@ 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 Set the default -Djava.endorsed.dirs argument
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


+ 2
- 9
bin/setclasspath.sh View File

@@ -16,9 +16,8 @@
# 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.
# Set JAVA_HOME or JRE_HOME if not already set and ensure any provided
# settings are valid and consistent with the selected start-up options.
# -----------------------------------------------------------------------------

# Make sure prerequisite environment variables are set
@@ -77,12 +76,6 @@ if [ "$1" = "debug" ] ; then
fi
fi

# Don't override the endorsed dir if the user has set it previously
if [ -z "$JAVA_ENDORSED_DIRS" ]; then
# Set the default -Djava.endorsed.dirs argument
JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
fi

# Set standard commands for invoking Java, if not already set.
if [ -z "$_RUNJAVA" ]; then
_RUNJAVA="$JRE_HOME"/bin/java


+ 1
- 7
bin/tool-wrapper.bat View File

@@ -31,12 +31,6 @@ 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 Defaults to $CATALINA_HOME/endorsed.
rem ---------------------------------------------------------------------------

setlocal
@@ -91,6 +85,6 @@ shift
goto setArgs
:doneSetArgs

%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%

:end

+ 1
- 8
bin/tool-wrapper.sh View File

@@ -32,12 +32,6 @@
# 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.
# Defaults to $CATALINA_HOME/endorsed.
# -----------------------------------------------------------------------------

# OS specific support. $var _must_ be set to either true or false.
@@ -126,7 +120,6 @@ if $cygwin; then
JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
fi

JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
@@ -134,6 +127,6 @@ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLog
# ----- Execute The Requested Command -----------------------------------------

exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-classpath "$CLASSPATH" \
-Dcatalina.home="$CATALINA_HOME" \
org.apache.catalina.startup.Tool "$@"

+ 3
- 52
build.properties.default View File

@@ -24,15 +24,14 @@

# ----- Version Control Flags -----
version.major=8
version.minor=0
version.build=39
version.minor=5
version.build=8
version.patch=0
version.suffix=

# ----- Build control flags -----
# Note enabling validation uses Checkstyle which is LGPL licensed
execute.validate=false
execute.test.bio=true
execute.test.nio=true
execute.test.nio2=true
# Still requires APR/native library to be present
@@ -77,8 +76,6 @@ trydownload.httpusecaches=true
# contexts by the various build scripts.
base.path=${user.home}/tomcat-build-libs

compile.source=1.7
compile.target=1.7
compile.debug=true

# Do not pass -deprecation (-Xlint:deprecation) flag to javac
@@ -98,42 +95,6 @@ base-maven.loc=http://repo.maven.apache.org/maven2
# Mirror, was used when there were problems with the main SF downloads site
# base-sf.loc=http://sunet.dl.sourceforge.net

# ----- Commons Logging, version 1.1 or later -----
# If this version is updated, check the versions required for the dependencies below
# - avalon-framework
# - log4j
# - logkit
# - servletapi
commons-logging.version=1.1.3
commons-logging.home=${base.path}/commons-logging-${commons-logging.version}
commons-logging-src.loc.1=${base-commons.loc.1}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz
commons-logging-src.loc.2=${base-commons.loc.2}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz
commons-logging-src.tar.gz=${commons-logging.home}/commons-logging-${commons-logging.version}-src.tar.gz

# ----- Avalon Framework (required by commons logging) -----
avalon-framework.version=4.1.5
avalon-framework.home=${base.path}/avalon-framework-${avalon-framework.version}
avalon-framework.loc=${base-maven.loc}/avalon-framework/avalon-framework/${avalon-framework.version}/avalon-framework-${avalon-framework.version}.jar
avalon-framework.jar=${avalon-framework.home}/avalon-framework-${avalon-framework.version}.jar

# ----- log4j (required by commons logging) -----
log4j.version=1.2.17
log4j.home=${base.path}/log4j-${log4j.version}
log4j.loc=${base-maven.loc}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar
log4j.jar=${log4j.home}/log4j-${log4j.version}.jar

# ----- logkit (required by commons logging) -----
logkit.version=1.0.1
logkit.home=${base.path}/logkit-${logkit.version}
logkit.loc=${base-maven.loc}/logkit/logkit/${logkit.version}/logkit-${logkit.version}.jar
logkit.jar=${logkit.home}/logkit-${logkit.version}.jar

# ----- servletapi (required by commons logging) -----
servletapi.version=2.3
servletapi.home=${base.path}/servletapi-${servletapi.version}
servletapi.loc=${base-maven.loc}/servletapi/servletapi/${servletapi.version}/servletapi-${servletapi.version}.jar
servletapi.jar=${servletapi.home}/servletapi-${servletapi.version}.jar

# ----- Webservices - JAX RPC -----
jaxrpc-lib.version=1.1-rc4
jaxrpc-lib.home=${base.path}/jaxrpc-${jaxrpc-lib.version}
@@ -146,7 +107,7 @@ wsdl4j-lib.home=${base.path}/wsdl4j-${wsdl4j-lib.version}
wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${wsdl4j-lib.version}.jar
wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar

# ----- Eclipse JDT, version 4.5 or later -----#
# ----- Eclipse JDT, version 4.5.1 or later -----#
# See https://wiki.apache.org/tomcat/JDTCoreBatchCompiler before updating
jdt.version=4.5.1
jdt.release=R-4.5.1-201509040015
@@ -225,16 +186,6 @@ checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar

# ----- JSON Libraries (for bayeux module) -----
json-lib.home=${base.path}/json-20080701
json-lib.lib=http://repo1.maven.org/maven2/org/json/json/20080701/json-20080701.jar
json-lib.jar=json.jar

# ----- Dojo Toolkit (for bayeux module) -----
dojo-js.home=${base.path}/dojo-release-1.1.1
dojo-js.loc=http://download.dojotoolkit.org/release-1.1.1/dojo-release-1.1.1.tar.gz
dojo-js.jar=${dojo-js.home}/dojo/dojo.js

# ----- Cobertura code coverage tool -----
cobertura.version=2.1.1
cobertura.home=${base.path}/cobertura-${cobertura.version}


+ 76
- 259
build.xml View File

@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?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
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Tomcat 8.0" default="deploy" basedir=".">
<project name="Tomcat 8.5" default="deploy" basedir=".">

<!-- ===================== Initialize Property Values ==================== -->

@@ -48,6 +48,8 @@
<property name="jsp.revision" value="FR" />
<property name="el.revision" value="FR" />
<property name="websocket.revision" value="FR" />
<!-- MR B but this was first 1.1 release so use FR -->
<property name="jaspic.revision" value="FR" />

<!-- Release artifact base names -->
<property name="final.name" value="${project}-${version}" />
@@ -93,6 +95,7 @@
<property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
<property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
<property name="websocket-api.jar" value="${tomcat.build}/lib/websocket-api.jar"/>
<property name="jaspic-api.jar" value="${tomcat.build}/lib/jaspic-api.jar"/>
<property name="tomcat-websocket.jar" value="${tomcat.build}/lib/tomcat-websocket.jar"/>
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
<property name="catalina-tribes.jar" value="${tomcat.build}/lib/catalina-tribes.jar"/>
@@ -118,6 +121,7 @@
<property name="jsp-api-src.jar" value="${tomcat.src.jars}/jsp-api-src.jar"/>
<property name="el-api-src.jar" value="${tomcat.src.jars}/el-api-src.jar"/>
<property name="websocket-api-src.jar" value="${tomcat.src.jars}/websocket-api-src.jar"/>
<property name="jaspic-api-src.jar" value="${tomcat.src.jars}/jaspic-api-src.jar"/>
<property name="tomcat-websocket-src.jar" value="${tomcat.src.jars}/tomcat-websocket-src.jar"/>
<property name="catalina-src.jar" value="${tomcat.src.jars}/catalina-src.jar"/>
<property name="catalina-tribes-src.jar" value="${tomcat.src.jars}/catalina-tribes-src.jar"/>
@@ -139,26 +143,18 @@
<property name="tomcat-embed-jasper.jar" value="${tomcat.embed}/tomcat-embed-jasper.jar"/>
<property name="tomcat-embed-el.jar" value="${tomcat.embed}/tomcat-embed-el.jar"/>
<property name="tomcat-embed-websocket.jar" value="${tomcat.embed}/tomcat-embed-websocket.jar"/>
<property name="tomcat-embed-juli.jar" value="${tomcat.embed}/tomcat-embed-logging-juli.jar"/>

<property name="tomcat-embed-core-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-core-src.jar"/>
<property name="tomcat-embed-jasper-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-jasper-src.jar"/>
<property name="tomcat-embed-el-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-el-src.jar"/>
<property name="tomcat-embed-websocket-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-websocket-src.jar"/>
<property name="tomcat-embed-juli-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-logging-juli-src.jar"/>

<!-- Extras JARs & source JARs -->
<property name="tomcat-juli-extras.jar" value="${tomcat.extras}/tomcat-juli.jar"/>
<property name="tomcat-juli-adapters.jar" value="${tomcat.extras}/tomcat-juli-adapters.jar"/>
<property name="catalina-ws.jar" value="${tomcat.extras}/catalina-ws.jar"/>
<property name="catalina-jmx-remote.jar" value="${tomcat.extras}/catalina-jmx-remote.jar"/>
<property name="tomcat-embed-log4j.jar" value="${tomcat.embed}/tomcat-embed-logging-log4j.jar"/>

<property name="tomcat-juli-extras-src.jar" value="${tomcat.extras.sources}/tomcat-juli-src.jar"/>
<property name="tomcat-juli-adapters-src.jar" value="${tomcat.extras.sources}/tomcat-juli-adapters-src.jar"/>
<property name="catalina-ws-src.jar" value="${tomcat.extras.sources}/catalina-ws-src.jar"/>
<property name="catalina-jmx-remote-src.jar" value="${tomcat.extras.sources}/catalina-jmx-remote-src.jar"/>
<property name="tomcat-embed-log4j-src.jar" value="${tomcat.embed.sources}/tomcat-embed-logging-log4j-src.jar"/>

<!-- jdbc-pool JARs & source JARs -->
<property name="tomcat-jdbc.jar" value="${tomcat.pool}/tomcat-jdbc.jar"/>
@@ -321,6 +317,10 @@
<include name="javax/websocket/**" />
</patternset>

<patternset id="files.jaspic-api">
<include name="javax/security/auth/message/**" />
</patternset>

<patternset id="files.tomcat-websocket">
<include name="org/apache/tomcat/websocket/**" />
</patternset>
@@ -358,6 +358,7 @@
<patternset id="files.tomcat-util">
<include name="org/apache/tomcat/util/buf/**" />
<include name="org/apache/tomcat/util/codec/**" />
<include name="org/apache/tomcat/util/collections/**" />
<include name="org/apache/tomcat/util/compat/**" />
<include name="org/apache/tomcat/util/file/**" />
<include name="org/apache/tomcat/util/res/**" />
@@ -365,7 +366,6 @@
<include name="org/apache/tomcat/util/threads/**" />
<include name="org/apache/tomcat/util/*" />
<exclude name="org/apache/tomcat/util/bcel" />
<exclude name="org/apache/tomcat/util/collections" />
<exclude name="org/apache/tomcat/util/descriptor" />
<exclude name="org/apache/tomcat/util/digester" />
<exclude name="org/apache/tomcat/util/http" />
@@ -417,7 +417,6 @@
<include name="org/apache/coyote/**" />
<!-- Remaining tomcat-util packages -->
<include name="org/apache/tomcat/util/bcel/**" />
<include name="org/apache/tomcat/util/collections/**" />
<include name="org/apache/tomcat/util/http/**" />
<include name="org/apache/tomcat/util/log/**" />
<include name="org/apache/tomcat/util/modeler/**" />
@@ -442,7 +441,9 @@
<patternset refid="files.annotations-api" />
<patternset refid="files.catalina" />
<patternset refid="files.servlet-api" />
<patternset refid="files.jaspic-api" />
<patternset refid="files.tomcat-api" />
<patternset refid="files.tomcat-juli" />
<!-- These pattern sets conflict so include files directly
<patternset refid="files.tomcat-coyote" />
<patternset refid="files.tomcat-util" />
@@ -470,9 +471,6 @@
<patternset refid="files.tomcat-websocket" />
</patternset>

<!-- Pattern sets used directly -->
<!--<patternset refid="files.tomcat-juli" />-->

<!-- Pattern sets not included in embedded -->
<!-- Cluster support not included in embedded -->
<!--<patternset refid="files.catalina-tribes" />-->
@@ -489,15 +487,6 @@
<include name="org/apache/catalina/mbeans/JmxRemote*" />
</patternset>

<patternset id="files.tomcat-extras-juli-adapters">
<include name="org/apache/juli/logging/impl/**" />
<exclude name="org/apache/juli/logging/impl/WeakHashtable*" />
<exclude name="org/apache/juli/logging/impl/LogFactoryImpl*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</patternset>

<!-- =========================== Build targets =========================== -->

<target name="build-prepare">
@@ -660,7 +649,7 @@
<compilerarg value="-Xlint:unchecked"/>
-->
<classpath refid="compile.classpath" />
<exclude name="org/apache/naming/factory/webservices/**" />
<exclude name="org/apache/naming/factory/webservices/**" />
</javac>
<!-- Copy static resource files -->
<copy todir="${tomcat.classes}" encoding="ISO-8859-1">
@@ -687,6 +676,7 @@
<filter token="jsp.revision" value="${jsp.revision}"/>
<filter token="el.revision" value="${el.revision}"/>
<filter token="websocket.revision" value="${websocket.revision}"/>
<filter token="jaspic.revision" value="${jaspic.revision}"/>

<mkdir dir="${tomcat.manifests}" />
<copy todir="${tomcat.manifests}" overwrite="yes" filtering="yes"
@@ -730,6 +720,12 @@
filesId="files.websocket-api"
manifest="${tomcat.manifests}/websocket-api.jar.manifest" />

<!-- JASPIC 1.1 API JAR File -->
<jarIt jarfile="${jaspic-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.jaspic-api"
manifest="${tomcat.manifests}/jaspic-api.jar.manifest" />

<!-- WebSocket 1.1 implementation JAR File -->
<jarIt jarfile="${tomcat-websocket.jar}"
filesDir="${tomcat.classes}"
@@ -1233,9 +1229,6 @@
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"/>
<jarIt jarfile="${tomcat-embed-juli.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-juli"/>

</target>

@@ -1259,9 +1252,6 @@
<jarIt jarfile="${tomcat-embed-websocket-sources.jar}"
filesDir="java"
filesId="files.tomcat-embed-websocket"/>
<jarIt jarfile="${tomcat-embed-juli-sources.jar}"
filesDir="java"
filesId="files.tomcat-juli"/>

<copy file="${tomcat-dbcp-src.jar}" todir="${tomcat.embed.sources}" />

@@ -1271,7 +1261,7 @@

<target name="embed"
description="Creates the experimental embedded release"
depends="embed-jars,embed-sources,embed-extras" >
depends="embed-jars,embed-sources" >

<fixcrlf srcdir="${tomcat.embed}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
@@ -1337,7 +1327,7 @@
<property name="junit.formatter.extension" value=".txt" />

<target name="test" description="Runs the JUnit test cases"
depends="test-bio,test-nio,test-nio2,test-apr,cobertura-report" >
depends="test-nio,test-nio2,test-apr,cobertura-report" >
<fileset id="test.result.skippedtests" dir="${test.reports}" includes="*.txt">
<not>
<contains text="Skipped: 0" />
@@ -1371,12 +1361,6 @@
<fail if="test.result.failure" message='Some tests completed with a Failure. See ${tomcat.build}/logs for details, search for "FAILED".' />
</target>

<target name="test-bio" description="Runs the JUnit test cases for BIO. Does not stop on errors."
depends="test-compile,deploy,cobertura-instrument,test-openssl-exists" if="${execute.test.bio}">
<runtests protocol="org.apache.coyote.http11.Http11Protocol"
extension=".BIO" />
</target>

<target name="test-nio" description="Runs the JUnit test cases for NIO. Does not stop on errors."
depends="test-compile,deploy,cobertura-instrument,test-openssl-exists" if="${execute.test.nio}">
<runtests protocol="org.apache.coyote.http11.Http11NioProtocol"
@@ -1450,6 +1434,7 @@
<sysproperty key="tomcat.test.reports" value="${test.reports}" />
<sysproperty key="tomcat.test.openssl.path" value="${test.openssl.path}" />
<sysproperty key="tomcat.test.relaxTiming" value="${test.relaxTiming}" />
<sysproperty key="tomcat.test.sslImplementation" value="${test.sslImplementation}" />
<!-- File for Cobertura to write coverage results to -->
<sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}" />

@@ -1472,7 +1457,7 @@
<!-- Exclude the tests known to fail -->
<exclude name="org/apache/catalina/tribes/test/**" />
<!-- Exclude the OpenSSL tests unless OpenSSL is available -->
<exclude name="org/apache/tomcat/util/net/jsse/openssl/**" unless="${test.openssl.exists}" />
<exclude name="org/apache/tomcat/util/net/openssl/ciphers/**" unless="${test.openssl.exists}" />
<!-- Exclude performance tests. E.g. on systems with slow/inconsistent timing -->
<exclude name="**/*Performance.java" if="${test.excludePerformance}" />
</fileset>
@@ -1523,6 +1508,7 @@
<exclude name="lib/**/jetty*.jar" />
<exclude name="lib/**/servlet-api*.jar" />
</fileset>
<pathelement path="res/cobertura"/>
</path>

<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
@@ -1554,7 +1540,7 @@
</target>

<target name="cobertura-report" if="${cobertura.enabled}"
depends="test-bio,test-nio,test-nio2,test-apr"
depends="test-nio,test-nio2,test-apr"
description="Creates report from gathered Cobertura results">

<cobertura-report srcdir="${basedir}/java" destdir="${cobertura.out}"
@@ -1593,149 +1579,9 @@
<mkdir dir="${tomcat.extras.sources}"/>
<mkdir dir="${tomcat.embed}"/>
<mkdir dir="${tomcat.embed.sources}"/>
<mkdir dir="${tomcat.extras}/logging"/>
<mkdir dir="${tomcat.extras}/webservices"/>
</target>

<target name="extras-commons-logging-prepare"
depends="extras-prepare"
description="Prepare to build web services extras package">

<antcall target="downloadfile-2">
<param name="sourcefile.1" value="${commons-logging-src.loc.1}"/>
<param name="sourcefile.2" value="${commons-logging-src.loc.2}"/>
<param name="destfile" value="${commons-logging-src.tar.gz}"/>
<param name="destdir" value="${commons-logging.home}"/>
</antcall>

<antcall target="downloadfile">
<param name="sourcefile" value="${avalon-framework.loc}"/>
<param name="destfile" value="${avalon-framework.jar}"/>
<param name="destdir" value="${avalon-framework.home}"/>
</antcall>

<antcall target="downloadfile">
<param name="sourcefile" value="${log4j.loc}"/>
<param name="destfile" value="${log4j.jar}"/>
<param name="destdir" value="${log4j.home}"/>
</antcall>

<antcall target="downloadfile">
<param name="sourcefile" value="${logkit.loc}"/>
<param name="destfile" value="${logkit.jar}"/>
<param name="destdir" value="${logkit.home}"/>
</antcall>

<antcall target="downloadfile">
<param name="sourcefile" value="${servletapi.loc}"/>
<param name="destfile" value="${servletapi.jar}"/>
<param name="destdir" value="${servletapi.home}"/>
</antcall>

</target>

<target name="extras-commons-logging"
depends="extras-commons-logging-prepare,compile,build-manifests"
description="Build JULI for log4j extras package">

<gunzip src="${commons-logging-src.tar.gz}"
dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
<untar src="${tomcat.extras}/logging/commons-logging-src.tar"
dest="${tomcat.extras}/logging/"/>

<replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/commons"
encoding="ISO-8859-1">
<replacefilter token="org.apache.commons"
value="org.apache.juli" />
</replace>
<mkdir dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/juli" />
<move todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/juli">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/commons" />
</move>

<replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
encoding="ISO-8859-1">
<replacefilter token="org.apache.commons"
value="org.apache.juli" />
<replacefilter token="org/apache/commons/"
value="org/apache/juli/" />
</replace>
<copy tofile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
file="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build.xml" />

<copy todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src">
<fileset file="${avalon-framework.jar}" />
<fileset file="${log4j.jar}" />
<fileset file="${logkit.jar}" />
<fileset file="${servletapi.jar}" />
</copy>

<ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
inheritAll="false" target="compile" />

<jar jarfile="${tomcat-juli-extras.jar}"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes">
<include name="org/apache/juli/logging/*" />
<include name="org/apache/juli/logging/impl/LogFactoryImpl*.class" />
<include name="org/apache/juli/logging/impl/WeakHashtable*.class" />
<include name="org/apache/juli/logging/impl/SimpleLog*.class" />
<include name="org/apache/juli/logging/impl/NoOpLog*.class" />
<include name="org/apache/juli/logging/impl/Jdk14Logger.class" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<fileset dir="${tomcat.classes}">
<include name="org/apache/juli/*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<hashAndSign file="${tomcat-juli-extras.jar}" />

<jarIt jarfile="${tomcat-juli-adapters.jar}"
filesDir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes"
filesId="files.tomcat-extras-juli-adapters" />
<hashAndSign file="${tomcat-juli-adapters.jar}" />

<!-- Source JARs -->
<jar jarfile="${tomcat-juli-extras-src.jar}"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java">
<include name="org/apache/juli/logging/*.java" />
<include name="org/apache/juli/logging/impl/LogFactoryImpl*.java" />
<include name="org/apache/juli/logging/impl/WeakHashtable*.java" />
<include name="org/apache/juli/logging/impl/SimpleLog*.java" />
<include name="org/apache/juli/logging/impl/NoOpLog*.java" />
<include name="org/apache/juli/logging/impl/Jdk14Logger.java" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<fileset dir="java">
<include name="org/apache/juli/*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<jarIt jarfile="${tomcat-juli-adapters-src.jar}"
filesDir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java"
filesId="files.tomcat-extras-juli-adapters" />

</target>

<target name="extras-webservices-prepare"
depends="extras-prepare"
description="Prepare to build web services extras package">
@@ -1802,57 +1648,10 @@
</target>

<target name="extras"
depends="extras-commons-logging,extras-webservices,extras-jmx-remote"
depends="extras-webservices,extras-jmx-remote"
description="Build all extras packages">
</target>

<target name="embed-extras" depends="extras"
description="Embedded packaging for those extras that can use it">

<jar jarfile="${tomcat-embed-log4j.jar}"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes">
<include name="org/apache/juli/logging/*" />
<include name="org/apache/juli/logging/impl/*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<fileset dir="${tomcat.classes}">
<include name="org/apache/juli/*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>

<jar jarfile="${tomcat-embed-log4j-src.jar}"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java">
<include name="org/apache/juli/logging/*.java" />
<include name="org/apache/juli/logging/impl/*.java" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<fileset dir="java">
<include name="org/apache/juli/*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>

</target>

<target name="dist-prepare" depends="download-dist">
<mkdir dir="${tomcat.dist}"/>
<mkdir dir="${tomcat.dist}/bin"/>
@@ -1947,7 +1746,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true">
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path refid="tomcat.webservices.classpath"/>
@@ -1967,7 +1767,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true">
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path refid="tomcat.webservices.classpath"/>
@@ -1987,7 +1788,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true">
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path refid="tomcat.webservices.classpath"/>
@@ -2007,7 +1809,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true">
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path refid="tomcat.webservices.classpath"/>
@@ -2026,7 +1829,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true">
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path refid="tomcat.webservices.classpath"/>
@@ -2039,11 +1843,12 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<link href="http://docs.oracle.com/javase/7/docs/api/"/>
<link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
<link href="http://docs.oracle.com/javaee/7/api/"/>
<sourcepath>
<path location="${tomcat.dist}/src/java"/>
<!--jdbc-pool src files for javadoc-->
<path location="${tomcat.dist}/src/modules/jdbc-pool/src/main/java"/>
</sourcepath>
<packageset dir="${tomcat.dist}/src/java/">
<include name="org/**"/>
<exclude name="org/apache/el/parser/**"/>
</packageset>
<!--jdbc-pool src files for javadoc-->
<packageset dir="${tomcat.dist}/src/modules/jdbc-pool/src/main/java"/>
</javadoc>
</target>

@@ -2058,6 +1863,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<include name="jsp-api.jar"/>
<include name="jasper.jar"/>
<include name="jasper-el.jar"/>
<include name="jaspic-api.jar"/>
<include name="servlet-api.jar"/>
<include name="websocket-api.jar"/>
<include name="tomcat-websocket.jar"/>
@@ -2254,7 +2060,7 @@ skip.installer property in build.properties" />
</signcode>
</target>

<target name="-installer" description="Builds Windows installer"
<target name="-installer" description="Builds the installer executable"
unless="skip.installer" depends="-installer-sign-uninstaller">
<exec dir="${tomcat.dist}" executable="${nsis.exe}" osfamily="windows">
<arg value="/DNSISDIR=${nsis.home}" />
@@ -2271,7 +2077,8 @@ skip.installer property in build.properties" />
<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}.exe" />
</target>

<target name="installer-sign" depends="-installer" if="${do.codesigning}" >
<target name="installer-sign" description="Builds and signs the Windows installer"
depends="-installer" if="${do.codesigning}" >
<taskdef name="signcode"
classname="org.apache.tomcat.buildutil.SignCode"
classpath="${tomcat.classes}" />
@@ -2466,26 +2273,10 @@ skip.installer property in build.properties" />

<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}.tar.gz">
<tarfileset dir="${tomcat.dist}" mode="755" prefix="${final.name}">
<include name="bin/catalina.sh" />
<include name="bin/configtest.sh" />
<include name="bin/daemon.sh" />
<include name="bin/digest.sh" />
<include name="bin/jasper.sh" />
<include name="bin/jspc.sh" />
<include name="bin/setclasspath.sh" />
<include name="bin/startup.sh" />
<include name="bin/shutdown.sh" />
<include name="bin/tool-wrapper.sh" />
<include name="bin/tool-wrapper-using-launcher.sh" />
<include name="bin/shutdown-using-launcher.sh" />
<include name="bin/startup-using-launcher.sh" />
<include name="bin/version.sh" />
</tarfileset>
<tarfileset dir="${tomcat.dist}" mode="600" prefix="${final.name}">
<tarfileset dir="${tomcat.dist}" dirmode="700" filemode="600" prefix="${final.name}">
<include name="conf/**" />
</tarfileset>
<tarfileset dir="${tomcat.dist}" prefix="${final.name}">
<tarfileset dir="${tomcat.dist}" dirmode="750" filemode="640" prefix="${final.name}">
<include name="bin/**" />
<include name="lib/**" />
<include name="logs/**" />
@@ -2519,6 +2310,24 @@ skip.installer property in build.properties" />
<exclude name="bin/*.exe"/>
<exclude name="bin/*.dll"/>
</tarfileset>
<!-- These need to be added after the bin directory is added else the -->
<!-- bin diretcory will pick up the wrong permissions. -->
<tarfileset dir="${tomcat.dist}" dirmode="750" filemode="750" prefix="${final.name}">
<include name="bin/catalina.sh" />
<include name="bin/configtest.sh" />
<include name="bin/daemon.sh" />
<include name="bin/digest.sh" />
<include name="bin/jasper.sh" />
<include name="bin/jspc.sh" />
<include name="bin/setclasspath.sh" />
<include name="bin/startup.sh" />
<include name="bin/shutdown.sh" />
<include name="bin/tool-wrapper.sh" />
<include name="bin/tool-wrapper-using-launcher.sh" />
<include name="bin/shutdown-using-launcher.sh" />
<include name="bin/startup-using-launcher.sh" />
<include name="bin/version.sh" />
</tarfileset>
</tar>

<hashAndSign file="${tomcat.release}/v${version}/bin/${final.name}.tar.gz" />
@@ -2650,6 +2459,14 @@ skip.installer property in build.properties" />
filesDir="java"
filesId="files.tomcat-websocket" />

<!-- JASPIC 1.1 API JAR File -->
<jarIt jarfile="${jaspic-api-src.jar}"
filesDir="java"
filesId="files.jaspic-api"
manifest="${tomcat.manifests}/jaspic-api.jar.manifest"
notice="${tomcat.manifests}/jaspic-api.jar.notice"
license="${tomcat.manifests}/jaspic-api.jar.license" />

<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap-src.jar}"
filesDir="java"


+ 4
- 3
conf/catalina.policy View File

@@ -186,12 +186,13 @@ grant {
permission java.util.PropertyPermission
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";

// Applications using Comet need to be able to access this package
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.comet";

// 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";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.servlet4preview.http";
};




+ 3
- 1
conf/catalina.properties View File

@@ -108,6 +108,7 @@ shared.loader=
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
jaspic-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,\
catalina-tribes.jar,\
jasper.jar,jasper-el.jar,ecj-*.jar,\
@@ -126,7 +127,8 @@ geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
junit.jar,junit-*.jar,ant-launcher.jar,\
junit.jar,junit-*.jar,hamcrest-*.jar,easymock-*.jar,cglib-*.jar,\
objenesis-*.jar,ant-launcher.jar,\
cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\
jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\
xom-*.jar


+ 1
- 7
conf/context.xml View File

@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?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
@@ -27,10 +27,4 @@
<!--
<Manager pathname="" />
-->

<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
</Context>

res/maven/tomcat-embed-logging-juli.pom → conf/jaspic-providers.xml View File

@@ -15,18 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<description>JULI logging implementation for embedded Tomcat</description>
<url>http://tomcat.apache.org/</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
<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
- 0
conf/jaspic-providers.xsd View 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" use="required" type="xs:string" />
<xs:attribute name="layer" use="required" type="xs:string" />
<xs:attribute name="appContext" use="required" 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>

+ 6
- 0
conf/logging.properties View File

@@ -62,3 +62,9 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].ha

# 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

+ 28
- 8
conf/server.xml View File

@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?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
@@ -61,7 +61,7 @@

<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
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
@@ -77,14 +77,34 @@
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation that requires the JSSE
style configuration. When using the APR/native implementation, the
OpenSSL style configuration is required as described in the APR/native
documentation -->
This connector uses the NIO implementation with the JSSE engine. When
using the JSSE engine, the JSSE configuration attributes must be used.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation. When using the
APR/native implementation or the OpenSSL engine with NIO or NIO2 then
the OpenSSL configuration attributes must be used.
-->
<!--
<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 -->


+ 1
- 1
conf/tomcat-users.xml View File

@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version="1.0" encoding="UTF-8"?>
<!--