To successfully build the JAKARTA-TAGLIBS custom tag libraries and Custom Tag Library Extensions (CTLX), you must download and install the following software components (where $JAKARTA_HOME refers to a directory into which you download and install the various Jakarta software components):
JAVA_HOME environment
variable to point at the directory where your JDK is installed,
and add the $JAVA_HOME/bin directory to your PATH.$JAKARTA_HOME/jakarta-ant.
If you have downloaded the source distribution, you will need to
build the executable version as follows:
cd $JAKARTA_HOME/jakarta-ant
./bootstrap.sh <-- Unix
bootstrap <-- Windows
This should cause the creation of an ant.jar file in
the $JAKARTA_HOME/jakarta-ant/dist/lib subdirectory.
Set the ANT_HOME environment variable to point at
your Ant distribution directory
$JAKARTA_HOME/jakarta-ant/dist
and add the $ANT_HOME/bin directory to your PATH.$JAKARTA_HOME/jakarta-servletapi. The Servlet 2.2
and JSP 1.1 jar can be obtained from
http://jakarta.apache.org/tomcat/
.
If you have downloaded the source distribution, you will need to build the
executable version as follows:
cd $JAKARTA_HOME/jakarta-servletapi
./build.sh dist <-- Unix
build dist <-- Windows
This should cause the creation of a servlet.jar file
in the lib subdirectory.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/site/sourceindex.html .
Download and unpack the JAKARTA-TAGLIBS distribution (from the link above)
into a subdirectory named jakarta-taglibs under the
$JAKARTA_HOME directory described above. For example, you
might end up with the following directory structure:
$JAKARTA_HOME/
jakarta-ant/ <-- Contains source distribution of Ant
dist/ <-- Contains binary distribution of Ant
lib/ <-- Binary libraries directory
ant.jar <-- Ant executable classes
jakarta-servletapi/ <-- Contains binary distribution of Servletapi
lib/ <-- Binary libraries directory
servlet.jar <-- Servlet API classes
jakarta-taglibs/ <-- Contains source distribution of the
JAKARTA-TAGLIBS libraries
... see below for details ...
jakarta-tomcat/ <-- Contains Tomcat (if you are using it)
The distribution archive will contain the following file and directory structure:
tools/{tool}/{version} directory.
Each directory will contain the following files and subdirectories
{taglib}-doc.war web
application archive in the binary distribution. See below for more
information about the internal directory structure of web applications.{taglib}-examples.war web application archive in the
binary distribution. See below for more information about the
internal directory structure of web applications.org.apache.taglibs.{taglib} so that multiple
JAKARTA-TAGLIBS can be used in the same application if desired.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:
web.xml file for this application, plus
any other files that should be copied to the WEB-INF subdirectory.org.apache.taglibs.{taglib}.doc for the documentation
application, and org.apache.taglibs.{taglib}.examples
for the example application.index.html or index.jsp
page in this directory will be the "home" page of the application when
it is deployed in a servlet container.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.
build.properties.sample to
build.properties.build.properties and set the jar file properties
to the absolute path and filename for the jar files required to build
all the JAKARTA-TAGLIBS.ant in a shell.In addition to the directories described earlier, two additional directory hierarchies will be created to contain the results of the build:
jakarta-taglibs/
build/ <-- Contains intermediate form results of
building JAKARTA-TAGLIBS custom libraries
dist/ <-- Contains the files that will be included
in the binary distribution of the
JAKARTA-TAGLIBS project, as described in
binary distribution documentation
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 Ant build, depending on what you want to do. In
each of the following cases use ant in a shell to execute
a build of the taglib for a specific ant build target:
build.sh shell script for unix or the build.bat
DOS script.
build/ directory) of the library itself, the
documentation application, and the example application. This copies any
static files that have been changed, and recompiles any Java source classes
that have been changed. Because this is the most commonly executed
command, it is the default.build/{taglib}/doc/ directory can be set
as the document root, and the application can be executed directly.build/{taglib}/examples/ directory can
be set as the document root, and the application can be executed directly.{taglib}.jar
and {taglib}.jar files for this tag library into the
distribution directory (dist/{taglib}/).
These distribution files can be copied directly into web applications
that wish to use this custom tag library.{taglib}-doc.war
documentation application, and copy it into the distribution directory
(dist/{taglib}/). This application can be
deployed and executed on any servlet container.{taglib}-examples.war
examples application, and copy it into the distribution directory
(dist/{taglib}/). This application can
be deployed and executed on any servlet container.library-dist, documentation-dist,
and examples-dist).The following directory and files are created when doing a build:
{taglib-name}.jar file.{taglib-name}-doc.war file and the intro.html file
which gets published to
http://jakarta.apache.org/taglibs/doc/{taglib-name}-doc/intro.html.{taglib-name}-examples.war file.The following directory and files are created when doing a distribution build:
When you perform a global build, the dist build target is invoked on each included subproject.