Web Hosting Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting

Alden Hosting provides professional, efficient, and reliable business-class Web hosting services to small- and medium-sized businesses.


Call Us Toll-Free
(877) 256-0328

Outside USA
1 - (201) 505-0430

Web Hosting Welcome Web Hosting Web Hosting Plans Overview , Fund Raising, Fundraising, web hosting, website hosting, web site hosting Web Hosting Fund Raising, Fundraising, web hosting Web Hosting Resellers, web Hosting Web Hosting Web Design, web Hosting Web Hosting Extra Services,  web Hosting Web Hosting Traffic Booster, web hosting Web Hosting Traffic Booster, web hosting Web Hosting Technical Support,  web Hosting Web Hosting webmaster tips,  web Hosting Web Hosting 30 Day Money Back, web hosting Web Hosting Legal Notices for Web Hosting Web Hosting Glossary Computer Terms for web Hosting Web Hosting Contact Information - web hosting

Site Map

  Web Hosting Web Hosting Sign-Up   Web Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting    Web Hosting Resellers web hosting, website hosting, web site hosting   Web Hosting EZ Site Control Panel for web hosting,website hosting, web site hosting
The Apache Tomcat Servlet/JSP Container - Building Tomcat

      The Apache Tomcat Servlet/JSP Container

The Apache Tomcat Servlet/JSP Container

Apache Logo


User Guide


Apache Tomcat Development

The Apache Tomcat Servlet/JSP Container

Building Tomcat

Printer Friendly Version

Building Tomcat from SVN is very easy, and is the first step to contributing to Tomcat. The following is a step by step TODO list.

Download and install a Java Development Kit 1.4.x or later

The default distribution of Tomcat .x requires a 5.0 or later JDK. Tomcat can be built using a 1.4.x JDK but you will need to copy the contents of the compat directory (created by the build process) to your build directory before Tomcat will start.

The Sun JDK can be downloaded here.

IMPORTANT: Set an environment variable JAVA_HOME to the pathname of the directory into which you installed the JDK release.

Install Apache Ant 1.6.2 or later

Download a binary distribution of Ant 1.6.2 or later from here.

Unpack the binary distribution into a convenient location so that the Ant release resides in its own directory (conventionally named "apache-ant-1.6.x"). 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 ${ant.home}, and modify the PATH environment variable to include directory "${ant.home}/bin" in its list. This makes the "ant" command line script available, which will be used to actually perform the build.

Building Tomcat

Download the main build.xml script from here.

Create a new directory, and copy the newly download build.xml to it. This directory will be referred to as the ${tomcat.source} directory in the rest of this document.

Go to that directory, and do:
cd ${tomcat.source}

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 checkout the Tomcat 5 sources from SVN, as well as download binaries to the /usr/share/java directory. Make sure this is appropriate to do so 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}/build.properties 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.

Updating and rebuilding Tomcat sources

It is recommended to regularly update the downloaded Tomcat 5 sources. To do this, execute the following commands:
cd ${tomcat.source}
ant checkout

For a quick rebuild of only modified code you can use:
cd ${tomcat.source}
ant build

Building with Eclipse

Important: This is not a supported means of building Tomcat; this information is provided without warranty :-). The only supported means of building Tomcat is with the "ant build" described above. However, some developers like to work on Java code with a Java IDE, and the following steps have been used by some developers.

Note that you must complete all the above steps to fetch the repositories and build some JAR files the first time. After you have completed the above steps, you can set up a series of Eclipse 4 projects. Note that this will not let you build everything under Eclipse; the build process requires use of Ant for the many stages that aren't simple Java compilations. However, it will allow you to view and edit the Java code, get warnings, reformat code, perform refactorings, run Tomcat under the IDE, and so on.

Use Windows->Preferences and then Java->Build Path->Classpath Variables to add two new Classpath variables:

TOMCAT_LIBS_BASEthe base path where the binary dependencies have been downloaded
ANT_HOMEthe base path of Ant 1.6.2 or later

Use File->New Project to create a new Java project for each of the binaries repository (e.g., /usr/share/java), container, connectors, jasper, servletapi. Unless you thought ahead to make the ${tomcat.source} directory be under your Workspace folder, tell Eclipse the external location using "Import/Export...", General->Existing Project into Workspace.

Eclipse .project and .classpath files are provided in each of these directories so Eclipse should find all source trees and jars, and hopefully compile without problems. Note that these files assume you are using Eclipse with a 5.0 or later JDK; also, the connectors module must be built with a compiler compliance level of 5.0.

To run Tomcat without a special IDE plug-in, you can simply use Run->Run... enter "org.apache.catalina.startup.Catalina" as the main class, "start" as program arguments, and "-Dcatalina.home=..." (with the name of your build directory) as VM arguments.

Note also that due to the way the Tomcat source is assembled from several SVN projects, you may not be able to use the Eclipse SVN client to update (nor to commit, if you are a committer). Use the external SVN client of your choice, then use the Eclipse PackageExplorer or Navigator "Refresh" context menu item to tell Eclipse that you've updated the files.

Building with other IDEs

The same caveats apply as for Eclipse, above.

The same general idea should work in most IDEs; it has been reported to work in Idea, for example.

Copyright © 1999-2006, Apache Software Foundation
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Add to My Yahoo!

XML icon

Add to Google












JSP at alden-servlet-Hosting.com
Servlets at alden-servlet-Hosting.com
Servlet at alden-servlet-Hosting.com
Tomcat at alden-servlet-Hosting.com
MySQL at alden-servlet-Hosting.com
Java at alden-servlet-Hosting.com
sFTP at alden-servlet-Hosting.com
JSP at alden-tomcat-Hosting.com
Servlets at alden-tomcat-Hosting.com
Servlet at alden-tomcat-Hosting.com
Tomcat at alden-tomcat-Hosting.com
MySQL at alden-tomcat-Hosting.com
Java at alden-tomcat-Hosting.com
sFTP at alden-tomcat-Hosting.com
JSP at alden-sftp-Hosting.com
Servlets at alden-sftp-Hosting.com
Servlet at alden-sftp-Hosting.com
Tomcat at alden-sftp-Hosting.com
MySQL at alden-sftp-Hosting.com
Java at alden-sftp-Hosting.com
sFTP at alden-sftp-Hosting.com
JSP at alden-jsp-Hosting.com
Servlets at alden-jsp-Hosting.com
Servlet at alden-jsp-Hosting.com
Tomcat at alden-jsp-Hosting.com
MySQL at alden-jsp-Hosting.com
Java at alden-jsp-Hosting.com
sFTP at alden-jsp-Hosting.com
JSp at alden-java-Hosting.com
Servlets at alden-java-Hosting.com
Servlet at alden-java-Hosting.com
Tomcat at alden-java-Hosting.com
MySQL at alden-java-Hosting.com
Java at alden-java-Hosting.com
sFTP at alden-java-Hosting.com
JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP at JSP.aldenWEBhosting.com Servlets at servlets.aldenWEBhosting.com Tomcat at Tomcat.aldenWEBhosting.com mysql at mysql.aldenWEBhosting.com Java at Java.aldenWEBhosting.com Web Hosts Portal Web Links Web Links Web Hosting JSP Solutions Web Links JSP Solutions Web Hosting Servlets Solutions Web Links Servlets Solutions Web Hosting Web Links Web Links . .
. .
. . . . jsp hosting servlets hosting web hosting web sites designed cheap web hosting web site hosting myspace web hosting