Introduction to Cocoon, XML XSL - Installing Tomcat (Page 3 of 9 )
Tomcat is the Apache Group's Java Servlet and JavaServer Page server. We need Tomcat for the Cocoon servlet to run.
Installing Tomcat is straight forward: all you need to do is unpack the file you downloaded, set JAVA_HOME and TOMCAT_HOME variables and start Tomcat.
The first step is to unpack Tomcat:
$ cd /usr/local/
$ gunzip jakarta-tomcat-3.2.1.tar.gz
$ tar -xvf jakarta-tomcat-3.2.1.tar
Then set up your environment:
$ JAVA_HOME=/path/to/jdk
$ TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2.1
$ export TOMCAT_HOME JAVA_HOME
You can add these lines to the file $TOMCAT_HOME/bin/tomcat.sh just above the first 'if' statement if you do not feel like setting these variable everytime.
That is all you need to do, Tomcat is ready to run. To start Tomcat cd to $TOMCAT_HOME/bin and run:
$ ./startup.sh
After a few moments you should see two lines that look like this:
2001-01-26 12:25:02 - PoolTcpConnector: Starting HttpConnectionHandler
on 8080
2001-01-26
12:25:02 - PoolTcpConnector: Starting Ajp12ConnectionHandler
on 8007
When you see these line Tomcat is running and ready to serve. Open up a browser and go to http://localhost:8080 and run a couple samples to make sure that Tomcat is working properly. Run at least one servlet and one jsp sample. If you get any errors check your environment and restart Tomcat.
Next: Installing Cocoon >>
More XML Articles
More By Olivier Eymere