
PROJECT jakarta-watchdog SOURCE TREE 
====================================
  
This is the source code tree for jakarta-watchdog(Jcheck) which is a
set of API validation tests for the Servlet 2.2 APIs and the JSP 
1.1 APIs.

How to Build
------------

There are 2 compilation scripts provided, a ksh based script for
Unix and a .bat based DOS build script. Essentially these scripts are
wrappers that put the ant.jar file on the classpath and calls:

      java org.apache.tools.ant.Main

To build, execute the either of the following commands in this
directory:

      (unix)% ./build.sh
      (dos)> .\build.bat 

This will build tests into a build directory located in this directory.

Windows Note: If you get an "Out of Environment Space" message, you
need to clean-up the initial environment of your command prompt window.

To build a 'distribution' build (with all the classes jarrd up), execute:

      (unix)% ./build.sh dist
      (dos)> \build.bat dist

To clean out the build and dist (removes the build/watchdog and dist/watchdog
dirs):

      (unix)% ./build.sh clean
      (dos)> .\build.bat clean

NOTE: To build Jcheck you will need "servlet-2.2.0.jar" in your CLASSPATH.
      It has all the Servlet 2.2 and JSP 1.1 public APIs. It can be found
      in the jakarta-tools workspace.
      Ofcourse, you will need a correct version of JDK (and tools.jar
      for JDK 1.2) as well.

Running the Build
-----------------

                   Jakarta
                      |
                     / \
                   /  |   \
                 /    |     \
               /      |       \
             /        |         \
           /         / \         \ 
         /         /     \          \
 jakarta-tomcat  build   dist    jakarta-watchdog
                          |
                         / \
                       /     \
                   tomcat   watchdog
                     |          |
                   webapps   webapps


Tests can be run in two different ways:

1) Running tests against the tomcat server:

    - Deploy the servlet and jsp test on the tomcat server by copying  
        jsp-tests.war and 
        servlet-tests.war 
      from 
        dist/watchdog/webapps
      to 
        dist/tomcat/webapps

    - Start tomcat server
       (unix)% cd dist/tomcat/bin
        (unix)% ./startup.sh

        (dos)> cd dist\tomcat\bin
        (dos)> .\startup.bat
        
    - Running Servlet tests

        (unix)% ./build.sh
        (unix)% cd ../dist/watchdog/bin
        (unix)% ./watchdog.sh servlet

        (dos)> .\build.bat
        (dos)> cd ..\dist\watchdog\bin
        (dos)> .\watchdog.bat servlet

    - Running JSP tests

        (unix)% ./build.sh
        (unix)% cd ../dist/watchdog
        (unix)% ./watchdog.sh jsp

        (dos)> .\build.bat
        (dos)> cd ..\dist\watchdog
        (dos)> .\watchdog.bat jsp

2) Running test against other servers:

    - Running Servlet tests.

      The server-side web-application is in 
        dist/watchdog/webapps/servlet-tests.war 

      Deploy this war file on the server you want to test. Then 

        (unix)% ./build.sh
        (unix)% cd ../dist/watchdog/bin
        (unix)% ./watchdog.sh servlet {host} {port}

        (dos)> .\build.bat
        (dos)> cd ..\dist\watchdog\bin
        (dos)> .\watchdog.bat servlet {host} {port}

    - Running JSP tests.

      The server-side web-application is in 
        dist/watchdog/webapps/jsp-tests.war 

      Install this war file on the server you want to test. Then 

        (unix)% ./build.sh
        (unix)% cd ../dist/watchdog/bin
        (unix)% ./watchdog.sh jsp {host} {port}

        (dos)> .\build.bat
        (dos)> cd ..\dist\watchdog\bin
        (dos)> .\watchdog.bat jsp {host} {port}


BEFORE COMMITTING CHANGES
-------------------------

You must, MUST do a `build clean;build` to make sure a clean
workspace builds. Also, you must, MUST run the tests. All tests must
pass before checking in the code. 

Related Documents
-----------------

Please read doc/design for further information on the Watchdog design overview.
For details on Ant, refer to http://jakarta.apache.org/ant/index.html
