Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

139 lines (91 sloc) 4.681 kb
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
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
Building The Apache Tomcat 6.0 Servlet/JSP Container
This subproject contains the source code for Tomcat 6.0, a container that
implements the Servlet 2.5 and JSP 2.1 specifications from the Java
Community Process <>. In order to build a binary
distribution version of the container from a source distribution,
do the following:
(0) Download and Install a Java Development Kit
* If the JDK is already installed, skip to (1).
* Download a Java Development Kit (JDK) release (version 1.5.x or later) from:
* Install the JDK according to the instructions included with the release.
* Set an environment variable JAVA_HOME to the pathname of the directory
into which you installed the JDK release.
(1) Install Apache Ant 1.6.x on your computer
* If Apache Ant 1.6.x is already installed on your computer, skip to (2).
* Download a binary distribution of Ant 1.6.x from:
* Unpack the binary distribution into a convenient location so that the
Ant release resides in its own directory (conventionally named
"apache-ant-[version]"). For the purposes of the remainder of this document,
the symbolic name "${ant.home}" is used to refer to the full pathname of
the release directory.
* Create an ANT_HOME environment variable to point the directory
* Modify the PATH environment variable to include the directory
${ant.home}/bin in its list. This makes the "ant" command line script
available, which will be used to actually perform the build.
(2) Building Tomcat 6.0
(2.1) Checkout or obtain the source code for Tomcat 6.0
* Tomcat SVN repository URL:
* Download a source package from:
* Checkout the source using SVN, selecting the desired version or
branch (current development source is at, or
unpack the source package. The location where the source has been
placed will be referred as ${tomcat.source}.
(2.2) Building
* Go to that directory, and do:
cd ${tomcat.source}
ant download
* NOTE: Users accessing the Internet through a proxy must use a properties
file to indicate to Ant the proxy configuration. Read below.
* WARNING: Running this command will download binaries to the /usr/share/java
directory. Make sure this is appropriate to do on your computer. On Windows,
this usually corresponds to the "C:\usr\share\java" directory, unless Cygwin
is used. Read below to customize the directory used to download the binaries.
* The build can be controlled by creating a ${tomcat.source}/
file, and adding the following content to it:
# ----- Proxy setup -----
# Uncomment if using a proxy server
# ----- Default Base Path for Dependent Packages -----
# Replace this path with the directory path where dependencies binaries
# should be downloaded
(3) Updating sources
It is recommended that you regularly update the downloaded Tomcat 6 sources
using your SVN client.
(4) Rebuilds
For a quick rebuild of only modified code you can use:
cd ${tomcat.source}
(5) Building the servlet and jsp API documentation
The documentation can be easly built:
cd ${tomcat.source}
ant -f dist.xml dist-javadoc
(6) Building a release running tests:
cd ${tomcat.source}
ant -f dist.xml release
Jump to Line
Something went wrong with that request. Please try again.