Disclaimer: this process is accurate for my computer at the time of installation. I can not GUARANTEE that this will work for any computer at any point in the future. If this process doesn't work for you (ie, the options have changed since then), let me know. (Please don't ask me about bugs; there are better resources for that kind of thing.) If I have the time, the resources, and the bandwidth, I might try rewriting this instruction sheet.

  1. Apache
    1. Download
      1. go to: http://www.apache.org/dyn/closer.cgi
      2. click on a location close to you (or pick one at random if you get stuck or don't care)
      3. go to httpd/binaries/win32/
      4. save 'apache_1.3.20-win32-no_src-r2.msi' (latest release as of this document) to hard drive
    2. Installation
      1. locate .msi file on hard drive and run
      2. Press next, read the terms of agreement, agree to them, etc... read important information
      3. Now to the most important part- Server information.
        1. Network domain. Chances are, you don't have one. If you're at WPI, then res.wpi.net will do just fine
        2. Server domain. If you're at WPI, then you'll need to find out what your computer name is registered as
        3. Your email address (you get to be the administrator).
        4. Click "run as a service for all users", unless you know you don't want people seeing anything on here and you're security conscious.
      4. Select the "complete" install (your only choices in "custom" are runtime programs and documentation).
      5. Pick a folder (I have the default "C:\Program Files\Apache Group\")
    3. Running/Testing
      1. Go to "Start->Programs->Apache httpd Server->Start Apache in Console" and select.
      2. go to: http://localhost
      3. Hopefully that will work. There are a few other locations you might want to try:
        1. http://hostname (where hostname is the name of your computer)
        2. http://hostname.res.wpi.net (ONLY if you chose the setup from above)
      4. Just make sure you have Apache in Console running, and you're good to go.
  2. Jakarta Tomcat
    1. Download
      1. go to: http://jakarta.apache.org/site/binindex.html
      2. look for latest version of Tomcat under "Release Builds" (currently Tomcat 3.2.3) - click on it
      3. save "jakarta-tomcat-x.x.x.zip" zip file to your hard drive
    2. Installation (the following is a barebones explanation; a more detailed explanation of Tomcat can be found within the User's Guide under doc\uguide\tomcat_ug.html, within the zip file)
      1. Extract zip file- you can choose where you like it, but I threw it underneath the "Program Files\Apache Group" folder (making that "C:\Program Files\Apache Group\jakarta-tomcat-3.2.3")
      2. Tomcat has environment variables that need to be set in the batch files. A lot of these should be all ready to begin with; however, depending on your OS settings, you'll need to up your initial environment memory. In Windows 98, right-click on the batch file, click on the 'memory' tab, and change "initial environment" to 4096. You'll want to do this to startup.bat, shutdown.bat, and tomcat.bat.

        You also want to set Tomcat to point towards your Java Runtime Environment (this can be downloaded seperately; I won't go into details as it's not part of this installation guide, but I can add it if necessary). If you plan to be doing Java development, downloading the JDK will include everything; otherwise, you just want the JRE. Look in jakarta-tomcat-3.2.3\bin\tomcat.bat; you'll see something concerning JAVA_HOME. Just set this to the directory directly above the 'bin' directory where java.exe is located (For example, "SET JAVA_HOME=C:\jdk1.3.1").

        Also, check upon your %CLASSPATH% variable by opening up a console window and typing "echo %CLASSPATH%". If it's blank, you don't have a problem; if your classpath is already set, however (for example, if you use VisualCafe), then you're going to want to erase what's in there. You can do that in tomcat.bat by including the line "SET CLASSPATH=" right under your "SET JAVA_HOME" line. If you'll be doing Java work you're going to want to point your CLASSPATH to the directory directly above "org" where the Java .class files are located.

      3. Add the following line to the bottom of your Apache/conf/httpd.conf document:
        Include "C:/Program Files/Apache Group/Apache/jakarta-tomcat-3.2.3/conf/tomcat-apache.conf"
        (Keep in mind; if you're running Apache right now, you'll have to restart for these changes to take effect.)
    3. Running/Testing
      1. First, keep in mind that you don't need Apache to run a servlet container, so you don't need to have Apache running for Tomcat to be up.
      2. To start up Tomcat, double-click on startup.bat. To access a page on Tomcat, go to http://localhost:8080 (this is the default port for Tomcat).
      3. When running with Apache, you want to follow this process:
        1. Start Tomcat (important because this generates the 'tomcat-apache.conf' file that Apache needs).
        2. Start Apache.
        3. Stop Apache.
        4. Stop Tomcat.
  3. Cocoon
    1. Download
      1. go to: http://xml.apache.org/cocoon2/dist/
      2. save latest zip file to hard drive (will probably have "<---------[ Latest distribution ]" next to it)
    2. Installation
      1. Find and unzip the zip file you downloaded; where is completely up to you (as you won't be needing it for too long).
      2. Tomcat comes with a few jar files that are not compatible with Cocoon. You'll want to delete the following from your tomcat\lib folder (don't worry, we'll replace them with other classes that will get the job done from Cocoon's jar files in a second):
        • jaxp.jar
        • parser.jar
      3. Now you want to COPY (not move) all of the jar files from the cocoon\lib folder to the tomcat\lib folder. Some of these probably won't be necessary in the future, but it's best to be safe, at least during development.
      4. Open up a console window and change directories to the cocoon directory.
      5. Let me reacquaint you with a few important environment variables: JAVA_HOME and TOMCAT_HOME. You want to go through and SET JAVA_HOME in your console window.
      6. Run the following command in your console window:
        .\build.bat -Dinclude.webapp.libs=yes -Dinstall.war=%TOMCAT_HOME%\webapps install
        As far as TOMCAT_HOME goes above, you can either set that in your browser beforehand or just type it in. It's probably just as easy to type it in right into the line, as you'll only be typing it once (hopefully). What this does is compile Cocoon into a Web Application Archive, or .war file (very similar to a Java Application Archive, or .jar), as well as install it directly into Tomcat's webapps directory. From here, it will be decompressed when Tomcat starts up (just like the other .war files in the webapps directory).
      7. It's also probably best to copy cocoon\build\cocoon.jar to tomcat\lib as well, overwriting the cocoon.jar you copied earlier (this jar file was just compiled when you ran that build.bat command).
    3. Running/Testing
      1. Make sure that the Tomcat\work directory is deleted, as well as a Tomcat\webapps\cocoon directory if there is one.
      2. Start Tomcat up, either with Apache or without.
      3. Point your browser at http://localhost:8080/cocoon.
      4. The most common error you'll see is an error in compiling the sitemap. Unfortunately, the stack trace is rarely helpful. If you want to be brave, edit the source supplied with Cocoon and recompile to try and give better error messages. Don't shy away from that if you really can't get it to work; it helped me to find a bug with VisualCafe and the CLASSPATH (mentioned above).
If you have a problem with any setup, go back through the steps and see if you missed anything. If you've tried it a few times, let me know what's going wrong; maybe I forgot something and I can add something that will help everybody. And if you get this far without an error, please let me know that as well; it's great to know who's able to actually get up and running with this system.

Best of luck!