Commit b7a94523 authored by Tony Mancill's avatar Tony Mancill

Imported Upstream version 7.0.33

parent d5e71a00
......@@ -15,7 +15,7 @@
limitations under the License.
================================================================================
$Id: BUILDING.txt 1348360 2012-06-09 11:17:55Z kkolinko $
$Id: BUILDING.txt 1371983 2012-08-11 17:23:27Z kkolinko $
====================================================
Building The Apache Tomcat @VERSION_MAJOR_MINOR@ Servlet/JSP Container
......@@ -37,10 +37,32 @@ source distribution, do the following:
1. If the JDK is already installed, skip to (2).
2. Download a Java Development Kit (JDK) release (version 1.6.x or later)
from:
2. Download a version 6 of Java Development Kit (JDK) release (use the
latest update available for your chosen version) from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
or from another JDK vendor.
Note regarding later versions of Java:
As documented elsewhere, one of components in Apache Tomcat includes
a private copy of the Apache Commons DBCP library. The source code
for this library is downloaded, processed by the build script
(renaming the packages) and compiled.
Due to changes in JDBC interfaces implemented by the library between
versions of Java SE specification, the library has to target specific
version of Java and can be compiled only with the JDK version
implementing this version of specification.
See Apache Commons DBCP project web site for more details on
available versions of the library and its requirements,
http://commons.apache.org/dbcp/
If you really want to use a later version of JDK to build Tomcat,
several workarounds are possible. One of them is to skip building
the component (tomcat-dbcp.jar).
3. Install the JDK according to the instructions included with the release.
......@@ -325,16 +347,17 @@ To enable Checkstyle, add the following property to build.properties file:
Once Checkstyle is enabled, the check will be performed automatically
during the build. The check is run before compilation of the source code.
It is possible to run the check separately. The command is:
cd ${tomcat.source}
ant validate
To speed-up repeated runs of this check, a cache is configured. The cache
is located in the following directory:
output/res/checkstyle
It is possible to run the check separately by invoking the "validate"
target. The command is:
cd ${tomcat.source}
ant -Dexecute.validate=true validate
(8.2) End-of-line conventions check
......
......@@ -25,7 +25,7 @@
<!-- set catalina.home if it's not already set -->
<dirname property="catalina.home.bin.dir" file="${ant.file.catalina-tasks}"/>
<property name="catalina.home" value="${catalina.home.bin.dir}/.."/>
<taskdef resource="org/apache/catalina/ant/catalina.tasks">
<typedef resource="org/apache/catalina/ant/catalina.tasks">
<classpath>
<fileset file="${catalina.home}/bin/tomcat-juli.jar"/>
<fileset file="${catalina.home}/lib/tomcat-api.jar"/>
......@@ -38,22 +38,8 @@
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
<fileset file="${catalina.home}/lib/tomcat-coyote.jar"/>
</classpath>
</taskdef>
<taskdef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">
<classpath>
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
<typedef
name="jmxEquals"
classname="org.apache.catalina.ant.jmx.JMXAccessorEqualsCondition">
<classpath>
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
</classpath>
</typedef>
<typedef
name="jmxCondition"
classname="org.apache.catalina.ant.jmx.JMXAccessorCondition">
<typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">
<classpath>
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
</classpath>
......
......@@ -228,7 +228,7 @@ case "$1" in
exit $?
;;
* )
echo "Unkown command: \`$1'"
echo "Unknown command: \`$1'"
echo "Usage: $PROGRAM ( commands ... )"
echo "commands:"
echo " run Start Tomcat without detaching from console"
......
......@@ -21,13 +21,13 @@
# modules that Tomcat depends on. Copy this file to "build.properties"
# in the top-level source directory, and customize it as needed.
#
# $Id: build.properties.default 1350468 2012-06-15 06:11:47Z markt $
# $Id: build.properties.default 1410718 2012-11-17 10:16:22Z markt $
# -----------------------------------------------------------------------------
# ----- Version Control Flags -----
version.major=7
version.minor=0
version.build=28
version.build=33
version.patch=0
version.suffix=
......@@ -182,7 +182,7 @@ junit.jar=${junit.lib}/junit-4.8.2.jar
junit.loc=http://cloud.github.com/downloads/KentBeck/junit/junit4.8.2.zip
# ----- Checkstyle, version 5.1 or later -----
checkstyle.version=5.5
checkstyle.version=5.6
checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle-${checkstyle.version}-bin.zip
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
......
......@@ -226,6 +226,7 @@
<include name="**/*.license"/>
<include name="**/*.manifest"/>
<include name="**/*.mdl"/>
<include name="**/*.MF"/>
<include name="**/*.notice"/>
<include name="**/*.nsi"/>
<include name="**/*.pl"/>
......@@ -461,7 +462,6 @@
<!-- Exclude auto-generated files -->
<exclude name="java/org/apache/el/parser/ELParser*.java" />
<exclude name="java/org/apache/el/parser/Node.java" />
<exclude name="java/org/apache/tomcat/util/http/parser/HttpParser*.java" />
<exclude name="java/org/apache/**/parser/JJT*ParserState.java" />
<exclude name="java/org/apache/**/parser/ParseException.java" />
<exclude name="java/org/apache/**/parser/SimpleCharStream.java" />
......@@ -470,11 +470,12 @@
<exclude name="**/org/apache/tomcat/dbcp/**"/>
<exclude name="**/tomcat-deps/**"/>
<!-- Exclude simple test files -->
<exclude name="test/webapp-3.0/bug53257/*.txt"/>
<exclude name="test/webapp-3.0/bug53257/**/*.txt"/>
<exclude name="test/webapp-3.0-fragments/WEB-INF/classes/*.txt"/>
</fileset>
<fileset dir="modules/jdbc-pool" >
<exclude name=".*/**"/>
<exclude name="**/MANIFEST.MF"/>
<patternset refid="text.files" />
</fileset>
</checkstyle>
......@@ -1692,7 +1693,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
</target>
<target name="dist-source">
<target name="dist-source" depends="compile-prepare">
<mkdir dir="${tomcat.dist}/src"/>
......@@ -1703,6 +1704,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<or>
<filename name="**/.settings/**" />
<filename name="**/.classpath"/>
<filename name="**/.checkstyle"/>
<filename name="**/.project"/>
<filename name="**/output/**"/>
<!-- Commented out, because
......@@ -1715,12 +1717,15 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<filename name="**/*.iml" />
<filename name="**/*.asc" />
<filename name="**/*.tmp" />
<filename name="**/*.jj" />
<filename name="**/maven-ant-tasks-*.jar" />
<filename name="**/thumbs.db" />
<filename name="**/Thumbs.db" />
<filename name="*.launch"/>
<filename name="bin/setenv.*" />
<filename name="java/org/apache/catalina/startup/catalina.properties" />
<filename name="logs/**" />
<filename name="webapps/docs/jdbc-pool.xml" />
<filename name="work/**" />
<filename name="modules/jdbc-pool/bin/**" />
<filename name="modules/jdbc-pool/includes/**" />
......
......@@ -73,8 +73,12 @@ server.loader=
# starting with file:.
shared.loader=
# List of JAR files that should not be scanned for configuration information
# such as web fragments, TLD files etc. It must be a comma separated list of
# List of JAR files that should not be scanned using the JarScanner
# functionality. This is typically used to scan JARs for configuration
# information. JARs that do not contain such information may be excluded from
# the scan to speed up the scanning process. This is the default list. JARs on
# this list are excluded from all scans. Scan specific lists (to exclude JARs
# from individual scans) follow this. The list must be a comma separated list of
# JAR file names.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
......@@ -84,6 +88,7 @@ shared.loader=
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Sun JDK JARs
# - OpenJDK JARs
# - Apple JDK JARs
tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
......@@ -104,14 +109,25 @@ 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,\
dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunmscapi.jar,\
sunpkcs11.jar,jhall.jar,tools.jar,\
access-bridge.jar,access-bridge-64.jar,dnsns.jar,jaccess.jar,ldapsec.jar,localedata.jar,\
sunjce_provider.jar,sunmscapi.jar,sunpkcs11.jar,jhall.jar,tools.jar,\
sunec.jar,zipfs.jar,\
gnome-java-bridge.jar,pulse-java.jar,\
apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,\
junit.jar,junit-*.jar,ant-launcher.jar
# Additional JARs (over and above the default JARs listed above) to skip when
# scanning for Servlet 3.0 pluggability features. These features include web
# fragments, annotations, SCIs and classes that match @HandlesTypes. The list
# must be a comma separated list of JAR file names.
org.apache.catalina.startup.ContextConfig.jarsToSkip=
# Additional JARs (over and above the default JARs listed above) to skip when
# scanning for TLDs. The list must be a comma separated list of JAR file names.
org.apache.catalina.startup.TldConfig.jarsToSkip=
#
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
......
This diff is collapsed.
......@@ -292,7 +292,7 @@ public class BeanELResolver extends ELResolver {
if (this.write == null) {
throw new PropertyNotFoundException(message(ctx,
"propertyNotWritable", new Object[] {
type.getName(), descriptor.getName() }));
owner.getName(), descriptor.getName() }));
}
}
return this.write;
......@@ -304,7 +304,7 @@ public class BeanELResolver extends ELResolver {
if (this.read == null) {
throw new PropertyNotFoundException(message(ctx,
"propertyNotReadable", new Object[] {
type.getName(), descriptor.getName() }));
owner.getName(), descriptor.getName() }));
}
}
return this.read;
......
......@@ -39,21 +39,179 @@ import java.io.IOException;
*/
public interface RequestDispatcher {
/**
* The name of the request attribute that should be set by the container
* when custom error-handling servlet or JSP page is invoked. The value of
* the attribute is of type {@code java.lang.Throwable}. See the chapter
* "Error Handling" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String ERROR_EXCEPTION = "javax.servlet.error.exception";
/**
* The name of the request attribute that should be set by the container
* when custom error-handling servlet or JSP page is invoked. The value of
* the attribute is of type {@code java.lang.Class}. See the chapter
* "Error Handling" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String ERROR_EXCEPTION_TYPE = "javax.servlet.error.exception_type";
/**
* The name of the request attribute that should be set by the container
* when custom error-handling servlet or JSP page is invoked. The value of
* the attribute is of type {@code java.lang.String}. See the chapter
* "Error Handling" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String ERROR_MESSAGE = "javax.servlet.error.message";
/**
* The name of the request attribute that should be set by the container
* when custom error-handling servlet or JSP page is invoked. The value of
* the attribute is of type {@code java.lang.String}. See the chapter
* "Error Handling" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String ERROR_REQUEST_URI = "javax.servlet.error.request_uri";
/**
* The name of the request attribute that should be set by the container
* when custom error-handling servlet or JSP page is invoked. The value of
* the attribute is of type {@code java.lang.String}. See the chapter
* "Error Handling" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String ERROR_SERVLET_NAME = "javax.servlet.error.servlet_name";
/**
* The name of the request attribute that should be set by the container
* when custom error-handling servlet or JSP page is invoked. The value of
* the attribute is of type {@code java.lang.Integer}. See the chapter
* "Error Handling" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String ERROR_STATUS_CODE = "javax.servlet.error.status_code";
/**
* The name of the request attribute that should be set by the container
* when the {@link #forward(ServletRequest, ServletResponse)} method is
* called. It provides the original value of a path-related property of the
* request. See the chapter "Forwarded Request Parameters" in the Servlet
* Specification for details.
*
* @since Servlet 3.0
*/
public static final String FORWARD_CONTEXT_PATH = "javax.servlet.forward.context_path";
/**
* The name of the request attribute that should be set by the container
* when the {@link #forward(ServletRequest, ServletResponse)} method is
* called. It provides the original value of a path-related property of the
* request. See the chapter "Forwarded Request Parameters" in the Servlet
* Specification for details.
*
* @since Servlet 3.0
*/
public static final String FORWARD_PATH_INFO = "javax.servlet.forward.path_info";
/**
* The name of the request attribute that should be set by the container
* when the {@link #forward(ServletRequest, ServletResponse)} method is
* called. It provides the original value of a path-related property of the
* request. See the chapter "Forwarded Request Parameters" in the Servlet
* Specification for details.
*
* @since Servlet 3.0
*/
public static final String FORWARD_QUERY_STRING = "javax.servlet.forward.query_string";
/**
* The name of the request attribute that should be set by the container
* when the {@link #forward(ServletRequest, ServletResponse)} method is
* called. It provides the original value of a path-related property of the
* request. See the chapter "Forwarded Request Parameters" in the Servlet
* Specification for details.
*
* @since Servlet 3.0
*/
public static final String FORWARD_REQUEST_URI = "javax.servlet.forward.request_uri";
/**
* The name of the request attribute that should be set by the container
* when the {@link #forward(ServletRequest, ServletResponse)} method is
* called. It provides the original value of a path-related property of the
* request. See the chapter "Forwarded Request Parameters" in the Servlet
* Specification for details.
*
* @since Servlet 3.0
*/
public static final String FORWARD_SERVLET_PATH = "javax.servlet.forward.servlet_path";
/**
* The name of the request attribute that should be set by the container
* when the {@link #include(ServletRequest, ServletResponse)} method is
* called on the {@code RequestDispatcher} obtained by a path and not by a
* name. It provides information on the path that was used to obtain the
* {@code RequestDispatcher} instance for this include call. See the chapter
* "Included Request Parameters" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path";
/**
* The name of the request attribute that should be set by the container
* when the {@link #include(ServletRequest, ServletResponse)} method is
* called on the {@code RequestDispatcher} obtained by a path and not by a
* name. It provides information on the path that was used to obtain the
* {@code RequestDispatcher} instance for this include call. See the chapter
* "Included Request Parameters" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
/**
* The name of the request attribute that should be set by the container
* when the {@link #include(ServletRequest, ServletResponse)} method is
* called on the {@code RequestDispatcher} obtained by a path and not by a
* name. It provides information on the path that was used to obtain the
* {@code RequestDispatcher} instance for this include call. See the chapter
* "Included Request Parameters" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String INCLUDE_QUERY_STRING = "javax.servlet.include.query_string";
/**
* The name of the request attribute that should be set by the container
* when the {@link #include(ServletRequest, ServletResponse)} method is
* called on the {@code RequestDispatcher} obtained by a path and not by a
* name. It provides information on the path that was used to obtain the
* {@code RequestDispatcher} instance for this include call. See the chapter
* "Included Request Parameters" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri";
/**
* The name of the request attribute that should be set by the container
* when the {@link #include(ServletRequest, ServletResponse)} method is
* called on the {@code RequestDispatcher} obtained by a path and not by a
* name. It provides information on the path that was used to obtain the
* {@code RequestDispatcher} instance for this include call. See the chapter
* "Included Request Parameters" in the Servlet Specification for details.
*
* @since Servlet 3.0
*/
public static final String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path";
/**
......
......@@ -50,9 +50,6 @@ import java.util.ResourceBundle;
* This class supports both the Version 0 (by Netscape) and Version 1 (by RFC
* 2109) cookie specifications. By default, cookies are created using Version 0
* to ensure the best interoperability.
*
* @author Various
* @version $Version$
*/
public class Cookie implements Cloneable, Serializable {
......@@ -96,7 +93,7 @@ public class Cookie implements Cloneable, Serializable {
* By default, cookies are created according to the Netscape cookie
* specification. The version can be changed with the
* <code>setVersion</code> method.
*
*
* @param name
* a <code>String</code> specifying the name of the cookie
* @param value
......@@ -140,7 +137,7 @@ public class Cookie implements Cloneable, Serializable {
* Specifies a comment that describes a cookie's purpose. The comment is
* useful if the browser presents the cookie to the user. Comments are not
* supported by Netscape Version 0 cookies.
*
*
* @param purpose
* a <code>String</code> specifying the comment to display to the
* user
......@@ -153,7 +150,7 @@ public class Cookie implements Cloneable, Serializable {
/**
* Returns the comment describing the purpose of this cookie, or
* <code>null</code> if the cookie has no comment.
*
*
* @return a <code>String</code> containing the comment, or
* <code>null</code> if none
* @see #setComment
......@@ -170,7 +167,7 @@ public class Cookie implements Cloneable, Serializable {
* visible to servers in a specified Domain Name System (DNS) zone (for
* example, <code>www.foo.com</code>, but not <code>a.b.foo.com</code>). By
* default, cookies are only returned to the server that sent them.
*
*
* @param pattern
* a <code>String</code> containing the domain name within which
* this cookie is visible; form is according to RFC 2109
......@@ -183,7 +180,7 @@ public class Cookie implements Cloneable, Serializable {
/**
* Returns the domain name set for this cookie. The form of the domain name
* is set by RFC 2109.
*
*
* @return a <code>String</code> containing the domain name
* @see #setDomain
*/
......@@ -201,7 +198,7 @@ public class Cookie implements Cloneable, Serializable {
* A negative value means that the cookie is not stored persistently and
* will be deleted when the Web browser exits. A zero value causes the
* cookie to be deleted.
*
*
* @param expiry
* an integer specifying the maximum age of the cookie in
* seconds; if negative, means the cookie is not stored; if zero,
......@@ -216,7 +213,7 @@ public class Cookie implements Cloneable, Serializable {
* Returns the maximum age of the cookie, specified in seconds, By default,
* <code>-1</code> indicating the cookie will persist until browser
* shutdown.
*
*
* @return an integer specifying the maximum age of the cookie in seconds; if
* negative, means the cookie persists until browser shutdown
* @see #setMaxAge
......@@ -237,7 +234,7 @@ public class Cookie implements Cloneable, Serializable {
* <p>
* Consult RFC 2109 (available on the Internet) for more information on
* setting path names for cookies.
*
*
* @param uri
* a <code>String</code> specifying a path
* @see #getPath
......@@ -249,7 +246,7 @@ public class Cookie implements Cloneable, Serializable {
/**
* Returns the path on the server to which the browser returns this cookie.
* The cookie is visible to all subpaths on the server.
*
*
* @return a <code>String</code> specifying a path that contains a servlet
* name, for example, <i>/catalog</i>
* @see #setPath
......@@ -263,7 +260,7 @@ public class Cookie implements Cloneable, Serializable {
* secure protocol, such as HTTPS or SSL.
* <p>
* The default value is <code>false</code>.
*
*
* @param flag
* if <code>true</code>, sends the cookie from the browser to the
* server only when using a secure protocol; if
......@@ -278,7 +275,7 @@ public class Cookie implements Cloneable, Serializable {
* Returns <code>true</code> if the browser is sending cookies only over a
* secure protocol, or <code>false</code> if the browser can send cookies
* using any protocol.
*
*
* @return <code>true</code> if the browser uses a secure protocol;
* otherwise, <code>true</code>
* @see #setSecure
......@@ -290,7 +287,7 @@ public class Cookie implements Cloneable, Serializable {
/**
* Returns the name of the cookie. The name cannot be changed after
* creation.
*
*
* @return a <code>String</code> specifying the cookie's name
*/
public String getName() {
......@@ -305,7 +302,7 @@ public class Cookie implements Cloneable, Serializable {
* parentheses, equals signs, commas, double quotes, slashes, question
* marks, at signs, colons, and semicolons. Empty values may not behave the
* same way on all browsers.
*
*
* @param newValue
* a <code>String</code> specifying the new value
* @see #getValue
......@@ -317,7 +314,7 @@ public class Cookie implements Cloneable, Serializable {
/**
* Returns the value of the cookie.
*
*
* @return a <code>String</code> containing the cookie's present value
* @see #setValue
* @see Cookie
......@@ -331,7 +328,7 @@ public class Cookie implements Cloneable, Serializable {
* complies with RFC 2109, and version 0 complies with the original cookie
* specification drafted by Netscape. Cookies provided by a browser use and
* identify the browser's cookie version.
*
*
* @return 0 if the cookie complies with the original Netscape specification;
* 1 if the cookie complies with RFC 2109
* @see #setVersion
......@@ -347,7 +344,7 @@ public class Cookie implements Cloneable, Serializable {
* <p>
* Since RFC 2109 is still somewhat new, consider version 1 as experimental;
* do not use it yet on production sites.
*
*
* @param v
* 0 if the cookie should comply with the original Netscape
* specification; 1 if the cookie should comply with RFC 2109
......@@ -359,7 +356,7 @@ public class Cookie implements Cloneable, Serializable {