Using the JAKARTA-TAGLIBS Source Distribution

Prerequisites

To successfully build the JAKARTA-TAGLIBS custom tag libraries, you must have successfully installed a Java Development Kit (JDK), version 1.1 or later, for your platform. Your PATH environment variable must include the /bin directory of the JDK, such that the java and javac commands are executable.

Also, you must acquire and install a suitable servlet.jar file that contains the standard servlet and JSP API classes for JSP version 1.1 or later. Normally, this file will be included with your servlet container. (If you have downloaded Tomcat, this file is available in the lib directory under your Tomcat installation home directory. Set an environment variable named SERVLET_JAR to contain the absolute pathname to the location of this file, to make it visible when you build JAKARTA-TAGLIBS libraries.

To build the JAKARTA-TAGLIBS custom tag libraries, you will need the Ant development tool, which is used to control the build process. A binary distribution of Ant is available from http://jakarta.apache.org/downloads/binindex.html. and should be unpacked (as described below) in a directory parallel to the directory into which you download and unpack the JAKARTA-TAGLIBS source distribution.

Finally, you will need a servlet container that is compatible with the Servlet API Specification, version 2.2 or later, and supports the JavaServer Pages (JSP) Specification, version 1.1 or later. Many such servlet containers are available -- the Jakarta project hosts the Tomcat servlet container (which meets these requirements) at http://jakarta.apache.org/downloads/binindex.html. (You can also download the source distribution of Tomcat and build it yourself, if you wish.)

Download and Installation

Source downloads of the JAKARTA-TAGLIBS distribution, as with all other Jakarta projects, are available from the Jakarta web site at http://jakarta.apache.org/downloads/sourceindex.html.

Download and unpack the JAKARTA-TAGLIBS distribution (from the link above) into a directory parallel to the directory into which you downloaded and unpacked the Ant distribution. For example, you might end up with the following directory structure:

your_home_directory/
    jakarta-ant/                <-- Contains binary distribution of Ant
        lib/                    <-- Binary libraries directory
	    ant.jar             <-- Ant executable classes
            xml.jar             <-- XML parser required by Ant
    jakarta-taglibs/            <-- Contains source distribution of the
                                    JAKARTA-TAGLIBS libraries
        ... see below ...

Be sure you have set your SERVLET_JAR environment variable to point at the servlet.jar containing the servlet and JSP API classes, as described above.

Directory Structures

The distribution archive will contain the following file and directory structure:

Within the doc/ and examples/ subdirectories for each custom tag library, the following directory organization is used to contain the source components of this application:

Building JAKARTA-TAGLIBS Libraries

To build the distribution version of all included custom tag libraries, set your current directory to the jakarta-taglibs directory into which you unpacked the distribution, and execute the global build script:

    build                       <-- Window platforms
    build.sh                    <-- Unix platforms

In addition to the directories described earlier, two additional directory hierarchies will be created to contain the results, resulting in the following overall organization:

your_home_directory/
    build/                      <-- Contains intermediate form results of
                                    building Jakarta applications
        taglibs/                <-- Contains intermediate form results of
                                    building JAKARTA-TAGLIBS custom libraries
    dist/                       <-- Contains the files that will be included
                                    in binary distributions of Jakarta
                                    applications
        taglibs/                <-- Contains the files that will be included
                                    in the binary distribution of the
                                    JAKARTA-TAGLIBS project, as described in
				    binary distribution documentation
    jakarta-ant/                <-- Contains binary distribution of Ant
        lib/                    <-- Binary libraries directory
	    ant.jar             <-- Ant executable classes
            xml.jar             <-- XML parser required by Ant
    jakarta-taglibs/            <-- Contains source distribution of the
                                    JAKARTA-TAGLIBS libraries

When you are working on a particular custom tag library, it is faster to rebuild only that particular library while doing development. To do this, change to the top level directory of that custom tag library (for example, change to the jakarta-taglibs/jspspec directory to work on the JSP Specification Examples custom tag library. You can now use one of several variants of the build script, depending on what you want to do. In each of the following cases use build on Windows systems, or build.sh on Unix systems:

When you perform a global build, the build dist option is invoked on each included subproject.

Adding A New JAKARTA-TAGLIBS Custom Tag Library

Adding a new custom tag library subproject to JAKARTA-TAGLIBS is fairly straightforward. It involves the following steps:


$Id: sourcedist.html,v 1.1 2000/04/10 00:52:10 craigmcc Exp $