Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 98822 invoked by uid 500); 6 Nov 2000 04:53:56 -0000 Delivered-To: apmail-jakarta-tomcat-cvs@apache.org Received: (qmail 98819 invoked by uid 1059); 6 Nov 2000 04:53:56 -0000 Date: 6 Nov 2000 04:53:56 -0000 Message-ID: <20001106045356.98818.qmail@locus.apache.org> From: craigmcc@locus.apache.org To: jakarta-tomcat-cvs@apache.org Subject: cvs commit: jakarta-tomcat/src/doc/appdev/sample build build.bat build.xml craigmcc 00/11/05 20:53:55 Modified: . Tag: tomcat_32 build.xml src/doc Tag: tomcat_32 index.html src/doc/appdev Tag: tomcat_32 build.xml.txt deployment.html footer.html installation.html source.html src/doc/appdev/sample Tag: tomcat_32 build build.bat build.xml Log: Miscellaneous updates to the Application Developer's Guide to bring it up to date with respect to Tomcat 3.2. Revision Changes Path No revision No revision 1.53.2.3 +16 -0 jakarta-tomcat/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.53.2.2 retrieving revision 1.53.2.3 diff -u -r1.53.2.2 -r1.53.2.3 --- build.xml 2000/09/13 20:11:14 1.53.2.2 +++ build.xml 2000/11/06 04:53:43 1.53.2.3 @@ -56,6 +56,14 @@ + + + + + + @@ -214,6 +222,14 @@ + + + + + + No revision No revision 1.5.2.3 +3 -4 jakarta-tomcat/src/doc/index.html Index: index.html =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/index.html,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -r1.5.2.2 -r1.5.2.3 --- index.html 2000/10/08 20:12:16 1.5.2.2 +++ index.html 2000/11/06 04:53:48 1.5.2.3 @@ -1,7 +1,7 @@ - + @@ -71,9 +71,8 @@   -
  • Application Development manual - The - steps required to build and deploy web applications within Tomcat ( somewhat - out of date).
    +
  • Developing Applications With Tomcat - + The steps required to build and deploy web applications within Tomcat
     
  • Other Resources No revision No revision 1.6.2.1 +21 -16 jakarta-tomcat/src/doc/appdev/build.xml.txt Index: build.xml.txt =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/build.xml.txt,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- build.xml.txt 2000/05/02 20:34:46 1.6 +++ build.xml.txt 2000/11/06 04:53:49 1.6.2.1 @@ -70,14 +70,18 @@ --> - - - - - - - - + + + + + + + + + + + + @@ -87,7 +91,7 @@ --> - + @@ -96,10 +100,7 @@ structure makes this very easy because the task automatically works its way down a source code hierarchy and compiles any class that has not yet been compiled, or where the source file is newer than the - class file. After compilation is complete, any non-Java files (such as - properties files containing resource bundles) found in the source code - hierarchy are copied to a corresponding position in the destination - directory hierarchy. + class file. Feel free to adjust the compilation option parameters (debug, optimize, and deprecation) to suit your requirements. It is also @@ -114,19 +115,23 @@ + + + - - + 1.2.4.1 +12 -4 jakarta-tomcat/src/doc/appdev/deployment.html Index: deployment.html =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/deployment.html,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -u -r1.2 -r1.2.4.1 --- deployment.html 2000/03/28 00:44:11 1.2 +++ deployment.html 2000/11/06 04:53:50 1.2.4.1 @@ -155,18 +155,22 @@ form, and execute the application that way. This approach would typically be used to install an additional application, provided by a third party vendor or by your internal development staff, into an existing - Tomcat installation. + Tomcat installation. NOTE - If you use this approach, + and wish to update your application later, you must both replace the + web application archive file AND delete the expanded + directory that Tomcat created, and then restart Tomcat, in order to reflect + your changes.

  • Add a <Context> entry in the Tomcat server.xml configuration file. This approach is described briefly below, and allows you to position the document root of your web application at some point other than the $TOMCAT_HOME/webapps/ directory. Doing this requires - the following steps (for Tomcat 3.1): + the following steps (for Tomcat 3.2):

    Adding a new <Context> entry in Tomcat's -server.xml file involves the following steps (for Tomcat 3.1): +server.xml file involves the following steps (for Tomcat 3.2):

    • Open file $TOMCAT_HOME/conf/server.xml in an editor.

      @@ -186,7 +190,8 @@
    • docBase. The document root directory for this web application. This can be a relative path (relative to the directory in which Tomcat is started), or an absolute path, to the - directory containing your app. On a Windows platform, you must + directory containing your app. On a Windows platform, you + MUST use the drive prefix and a colon when specifying an absolute path. This attribute is required.
    • debug. Debugging detail level (from "0" to "9") that defines @@ -202,6 +207,9 @@ useful during development, it requires overhead to do the checking. This capability should generally not be used in deployed production applications. +
    • trusted. Set to "true" if this application requires access + to Tomcat 3.2 internal classes. Normally, this will only be required + for the administration application that ships with Tomcat.
    1.1.4.1 +1 -1 jakarta-tomcat/src/doc/appdev/footer.html Index: footer.html =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/footer.html,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- footer.html 2000/03/05 05:35:18 1.1 +++ footer.html 2000/11/06 04:53:50 1.1.4.1 @@ -1,7 +1,7 @@ -Developing Applications With Tomcat 3.1 - Footer +Developing Applications With Tomcat - Footer 1.2.4.2 +4 -3 jakarta-tomcat/src/doc/appdev/installation.html Index: installation.html =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/installation.html,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -u -r1.2.4.1 -r1.2.4.2 --- installation.html 2000/10/01 01:00:45 1.2.4.1 +++ installation.html 2000/11/06 04:53:50 1.2.4.2 @@ -43,7 +43,7 @@

    Compatible JDKs for many platforms (or links to where they can be found) are available at -http://java.sun.com/jdk/. +http://java.sun.com/j2se/. @@ -85,7 +85,8 @@ tool, it does not include the Ant developer documentation. This can be acquired by downloading the complete Ant release from http://jakarta.apache.org/downloads/binindex.html -page. +page. The example application build scripts assume that you have +Ant 1.2 or later.

    @@ -101,7 +102,7 @@

    Detailed instructions for installing and using source code control applications is beyond the scope of this manual. However, CVS server and client tools for many platforms (along with documentation) can be downloaded -from http://www.sourcegear.com/CVS. +from http://www.cvshome.org. 1.2.4.1 +23 -45 jakarta-tomcat/src/doc/appdev/source.html Index: source.html =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/source.html,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -u -r1.2 -r1.2.4.1 --- source.html 2000/03/28 00:44:11 1.2 +++ source.html 2000/11/06 04:53:51 1.2.4.1 @@ -153,12 +153,6 @@ targets that can be executed. Briefly, the following targets are generally provided:

      -
    • init - The initialization target is not executed directly. - Instead, it is invoked indirectly (by virtue of a depends - attribute) by all other build targets. This is a convenient place - to create defaults for property values, which can be overridden by - system properties on the command line that starts Ant. -

    • prepare - This target "prepares" the deployment directory, creating subdirectories as required. A common use of this target is to copy static files (documentation, HTML pages, and JSP pages) @@ -171,13 +165,10 @@
    • compile - This target is used to compile any source code that has been changed since the last time compilation took place. The resulting class files are created in the deployment directory, so - that they can be directly executed when Tomcat is run. A cool feature - of the Ant javac task is that it also copies any non-Java - source files to corresponding places in the deployment directory, while - maintaining the appropriate package hierarchy. This is perfect for - properties files that you reference as resource bundles. The "compile" - target is generally defined as the default target for your project, - so it will be executed when you simply type build. + that they can be directly executed when Tomcat is run. + NOTE - Previous versions of Ant copied properties files + and other resource files for you as part of the execution of the + <javac> task. You must now do this explicitly.
    • javadoc - This target creates Javadoc API documentation for the Java classes in this web application. The example build.xml file assumes you want to include the API documentation with your app, @@ -216,18 +207,16 @@
         #!/bin/sh
        -# build -- Build Script for "My Application"
        -# $Id: source.html,v 1.2 2000/03/28 00:44:11 craigmcc Exp $
        +# build -- Build Script for the "Hello, World" Application
        +# $Id: source.html,v 1.2.4.1 2000/11/06 04:53:51 craigmcc Exp $
         
         # Identify the custom class path components we need
        -CP=$TOMCAT_HOME/classes:$TOMCAT_HOME/lib/ant.jar:$TOMCAT_HOME/lib/xml.jar
        -CP=$CP:$TOMCAT_HOME/lib/jasper.jar:$TOMCAT_HOME/lib/servlet.jar
        -CP=$CP:$TOMCAT_HOME/lib/webserver.jar
        +CP=$TOMCAT_HOME/lib/ant.jar:$TOMCAT_HOME/lib/servlet.jar
        +CP=$CP:$JAVA_HOME/lib/tools.jar
         
         # Execute ANT to perform the requested build target
        -java -Dtomcat.home=$TOMCAT_HOME -classpath $CP:$CLASSPATH \
        -   org.apache.tools.ant.Main "$@"
        -
        +java -classpath $CP:$CLASSPATH org.apache.tools.ant.Main \
        +  -Dtomcat.home=$TOMCAT_HOME "$@"
         

      On Windows-based systems, the following script should be saved as file @@ -235,32 +224,21 @@ as required:

        +@echo off
        +rem build.bat -- Build Script for the "Hello, World" Application
        +rem $Id: source.html,v 1.2.4.1 2000/11/06 04:53:51 craigmcc Exp $
        +
        +set _CP=%CP%
        +
        +rem Identify the custom class path components we need
        +set CP=%TOMCAT_HOME%\lib\ant.jar;%TOMCAT_HOME%\lib\servlet.jar
        +set CP=%CP%;%JAVA_HOME%\lib\tools.jar
         
        -echo off
        -rem Build Script for "My Application"
        -rem $Id: source.html,v 1.2 2000/03/28 00:44:11 craigmcc Exp $
        -
        -rem Identify the custom class path we need
        -if "%CLASSPATH%" == "" goto noclasspath
        -set _CLASSPATH=%CLASSPATH%
        -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%/classes
        -goto restclasspath
        -:noclasspath
        -set _CLASSPATH=
        -set CLASSPATH=%TOMCAT_HOME%/classes
        -:restclasspath
        -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%/lib/ant.jar;%TOMCAT_HOME%/lib/xml.jar
        -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%/lib/jasper.jar
        -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%/lib/servlet.jar
        -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%/lib/webserver.jar
        -
        -rem Execute ANT to perform the requested build target
        -java -Dtomcat.home=%TOMCAT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
        -
        -rem Clean up CLASSPATH
        -set CLASSPATH=%_CLASSPATH%
        -set _CLASSPATH=
        +rem Execute ANT to perform the requird build target
        +java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
         
        +set CP=%_CP%
        +set _CP=
         

      Build script customizations you might consider include: No revision No revision 1.2.4.1 +3 -4 jakarta-tomcat/src/doc/appdev/sample/build Index: build =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/sample/build,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -u -r1.2 -r1.2.4.1 --- build 2000/04/04 22:01:13 1.2 +++ build 2000/11/06 04:53:53 1.2.4.1 @@ -1,11 +1,10 @@ #!/bin/sh # build -- Build Script for the "Hello, World" Application -# $Id: build,v 1.2 2000/04/04 22:01:13 craigmcc Exp $ +# $Id: build,v 1.2.4.1 2000/11/06 04:53:53 craigmcc Exp $ # Identify the custom class path components we need -CP=$TOMCAT_HOME/classes:$TOMCAT_HOME/lib/ant.jar:$TOMCAT_HOME/lib/xml.jar -CP=$CP:$TOMCAT_HOME/lib/jasper.jar:$TOMCAT_HOME/lib/servlet.jar -CP=$CP:$TOMCAT_HOME/lib/webserver.jar +CP=$TOMCAT_HOME/lib/ant.jar:$TOMCAT_HOME/lib/servlet.jar +CP=$CP:$JAVA_HOME/lib/tools.jar # Execute ANT to perform the requested build target java -classpath $CP:$CLASSPATH org.apache.tools.ant.Main \ 1.3.2.1 +9 -27 jakarta-tomcat/src/doc/appdev/sample/build.bat Index: build.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/sample/build.bat,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 --- build.bat 2000/05/19 21:32:09 1.3 +++ build.bat 2000/11/06 04:53:54 1.3.2.1 @@ -1,33 +1,15 @@ @echo off rem build.bat -- Build Script for the "Hello, World" Application -rem $Id: build.bat,v 1.3 2000/05/19 21:32:09 nacho Exp $ +rem $Id: build.bat,v 1.3.2.1 2000/11/06 04:53:54 craigmcc Exp $ -if "%TOMCAT_HOME%" == "" goto notomcathome -if "%CLASSPATH%" == "" goto noclasspath +set _CP=%CP% -:haveclasspath -set _CLASSPATH=%CLASSPATH% -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME\classes -goto restofclasspath +rem Identify the custom class path components we need +set CP=%TOMCAT_HOME%\lib\ant.jar;%TOMCAT_HOME%\lib\servlet.jar +set CP=%CP%;%JAVA_HOME%\lib\tools.jar -:noclasspath -set _CLASSPATH= -set CLASSPATH=%TOMCAT_HOME%\classes +rem Execute ANT to perform the requird build target +java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9 -:restofclasspath -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\ant.jar -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar -set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar - -rem Execute ANT to perform the requested build target -java org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9 - -set CLASSPATH=%_CLASSPATH% -set _CLASSPATH= -goto end -:notomcathome -echo -echo you need to set TOMCAT_HOME to build this app -echo -:end \ No newline at end of file +set CP=%_CP% +set _CP= 1.5.2.2 +19 -11 jakarta-tomcat/src/doc/appdev/sample/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/doc/appdev/sample/build.xml,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- build.xml 2000/08/24 01:57:30 1.5.2.1 +++ build.xml 2000/11/06 04:53:54 1.5.2.2 @@ -6,7 +6,7 @@ NOTE: Before using this file as is, you should review the values for the properties that are defined below. In particular, it is assumed that you wish to install this - application under context path "/myapp" in the Tomcat installation + application under context path "/${app.name}" in the Tomcat installation defined by your TOMCAT_HOME environment variable. --> @@ -19,21 +19,25 @@ - - - - - + + + + + + + - + - + @@ -41,11 +45,15 @@ + + + - +