Chapter 3. TomCat

Be careful that the new versions (Apache 2 and tomcat 4) needs some particular changes. I will try to integrate them, but for now, check the Chapter 5 : References at the end of this document !

How to setup Tomcat 4

Installation (Windows 2000). Go to the Tomcat page of the Apache "Jakarta" project. Download the file jakarta-tomcat-4.0.3-LE-jdk14.tar.gz (2.6Mo) If you have the J2SE 1.4. Or use one of the other distribution file from this directory. You can unpack the files in your "C:\Programs" directory. You can launch and stop Tomcat with the Startup.bat and Shutdown.bat files in the bin directory. Note : with the 4.0.3 version the examples didn't work "out of the box". I have to comment out two filters : "Set Character Encoding" and "Compression Filter" from the "examples/WEB-INF/web.xml" file. Errors were reported in the log file : logs/localhost_examples_log ...

Installation (Linux). Go to the Tomcat page of the Apache "Jakarta" project. (At the time of writing this the RPM directory is not clean ! I better advise to wait or not to use the RPM version !) Download the files tomcat4-4.0.1-1.noarch.rpm (2.2Mo) and tomcat4-webapps-4.0.1-1.noarch.rpm (1.3Mo). Or use one of the other distribution file from this directory. Simply use a package manager to install them. Tomcat is configured as a service (daemon). You have to modify /etc/tomcat4/conf/tomcat4.conf to point to your JVM (by default it use "/opt/IBMJava ... ")

How-to put the data on an different partition. Edit your server.xml file (in the "C:\Programs\jakarta-tomcat-4.0.3-LE-jdk14\conf" directory.) In the <Service name="Tomcat-Apache"> change the following :

			...
		    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
				name="Apache" debug="0" defaultHost="152.118.12.179" 
				appBase="D:/bruno/doc/Dev/web/webapps">

				<Host name="152.118.12.179" debug="0" 
					appBase="D:/bruno/doc/Dev/web/webapps" unpackWARs="true">

					<!-- Tomcat Examples Context -->
					<Context path="/examples" 
						docBase="D:/bruno/doc/Dev/web/webapps/examples" debug="0"
						reloadable="true"/>
				</Host>

				<!-- Global logger unless overridden at lower levels -->
				<Logger className="org.apache.catalina.logger.FileLogger"
					prefix="apache_log." suffix=".txt"
					timestamp="true"/>

				<!-- Because this Realm is here, an instance will be shared globally -->
				<Realm className="org.apache.catalina.realm.MemoryRealm" />

			</Engine>
			...
		

This cover only the <Service name="Tomcat-Apache">. Not the Stand-alone service.