In order to build Catalina, you will need to download and install the
software components that it relies on, as follows. In the descriptions
below, $JAKARTA_HOME is assumed to be the directory into which
you are installing the required Jakarta modules. It is assumed that
you are using CVS to access the Jakarta source code repositories, as
described at
Download and install a version 1.2 (or later) Java Development Kit (JDK)
implementation for your operating system platform. Set a
JAVA_HOME environment variable to point at the directory where
your JDK is installed, and add $JAVA_HOME/bin to your
PATH. In addition, configure the CLASSPATH
environment variable as described below to reflect the other packages
that are installed, or place the relevant JAR files into your JDK
extensions directory ($JAVA_HOME/jre/lib/ext).
If you are running a JDK earlier than version 1.3, download and install
the current version of the Java Naming and Directory Interface (JNDI) package
from http://java.sun.com/products/jndi. None of the JNDI providers are required (unless you need to use them
in your own applications), but the jndi.jar file must be available
on the class path or as a system extension.
If you want to build in support for JNDI JDBC DataSources you need to download the following packages and put their jar files in your classpath.
Download and install the current version of the Java API for XML Parsing
(JAXP) implementation from
http://java.sun.com/xml. Set an
environment variable JAXP_HOME that points at the directory
to which you installed the distribution.
Download and install the current version of the Java Secure Sockets
Extension (JSSE) implementation from
http://java.sun.com/products/jsse.
Set an environment variable JSSE_HOME that points at the
directory to which you installed the distribution.
Using CVS, check out the jakarta-ant module from
the Jakarta CVS repository into $JAKARTA_HOME/jakarta-ant.
Then, build Ant by executing the following:
./bootstrap.sh <-- Unix
bootstrap <-- Windows
Set an environment variable ANT_HOME that points at the
directory where you installed the Ant module, if you placed it
in any location other than $JAKARTA_HOME/jakarta-ant.
Using CVS, check out the jakarta-regexp module from
the Jakarta CVS repository into $JAKARTA_HOME/jakarta-regexp.
Then, build the regular expression library by executing the following:
cd build
./build-regexp.sh <-- Unix
build-regexp <-- Windows
Set an environment variable REGEXP_HOME that points at the
directory where you installed the Regexp module if you placed it
in any location other than $JAKARTA_HOME/jakarta-regexp.
Using CVS, check out the jakarta-servletapi module from
the Jakarta CVS repository into $JAKARTA_HOME/jakarta-servletapi.
Then, update to the branch containing the servlet 2.3 / JSP 1.2 classes
(only need to do this once in a checked out directory) and build it:
cd $JAKARTA_HOME/jakarta-servletapi <-- Unix
cvs update -r SERVLET_23_JSP_12 <-- Unix
./build.sh dist <-- Unix
cd $JAKARTA_HOME\jakarta-serletapi <-- Windows
cvs update -r SERVLET_23_JSP_12 <-- Windows
build dist <-- Windows
Set an environment variable SERVLETAPI_HOME that points at
the directory where you installed the Servletapi module if you placed it
in any location other than $JAKARTA_HOME/jakarta-servletapi.
Using CVS, check out the jakarta-tomcat-4.0 module from
the Jakarta CVS repository into $JAKARTA_HOME/jakarta-tomcat-4.0.
The Catalina source code is in directory catalina in this
module.
To build a Tomcat that contains Catalina, Jasper, and the sample webapps, do the following:
cd $JAKARTA_HOME/jakarta-tomcat-4.0 <-- Unix
./build.sh <-- Unix
cd $JAKARTA_HOME\jakarta-tomcat-4.0 <-- Windows
build <-- Windows
which will build into directory $JAKARTA_HOME/build/tomcat-4.0.
You can create a distribution build (that matches the directory layout of the
nightly builds) by adding a dist target to the build command.
If you wish to build just the Catalina component, do this instead:
cd $JAKARTA_HOME/jakarta-tomcat-4.0 <-- Unix
cd catalina <-- Unix
./build.sh <-- Unix
cd $JAKARTA_HOME\jakarta-tomcat-4.0 <-- Windows
cd catalina <-- Windows
build <-- Windows
which will build into directory $JAKARTA_HOME/build/catalina.
If you have built a Tomcat build, you can test it as follows:
cd $JAKARTA_HOME/build/tomcat-4.0 <-- Unix
./bin/catalina.sh start <-- Unix
cd $JAKARTA_HOME\build\tomcat-4.0 <-- Windows
.\bin\catalina start <-- Windows
To access the default content and examples, access the following URL with your web browser:
http://localhost:8080
To shut down Tomcat, execute the following commands:
cd $JAKARTA_HOME/build/tomcat-4.0 <-- Unix
./bin/catalina.sh stop <-- Unix
cd $JAKARTA_HOME\build\tomcat-4.0 <-- Windows
.\bin\catalina stop <-- Windows
The bug reporting system we are using can be reached via http://jakarta.apache.org/bugs. Please use the product category "Catalina" for issues specific to Catalina.
Before committing any changes to the jakarta-tomcat-4.0
CVS module, you must ensure that a complete build of the entire workspace
is successful, and that all of the tests run correctly.