Note: These steps are not needed for Mac OS X Server 10.2 or later. The Server Settings application offers a checkbox for "Start Tomcat on System Startup" in the the Configure Web Service window.
Important, before you begin:
1. You will edit the "httpd.conf" file to enable Tomcat. Follow these steps carefully, and be sure not to change files in any other way than specifically described.
2. Before starting, it is recommended that you make a duplicate of the "httpd.conf" file. If you need to reinstall it, delete the 'httpd.conf' file, and change the name of the copy to "httpd.conf" (to match the one you are replacing).
3. A pound sign (#) in the front of a line indicates that the line will not be read by Apache when starting. Removing pound signs, as described, will cause Apache to read the configuration from that line.
4. Beyond the Knowledge Base, Apple does not offer technical support for configuring or using Tomcat. See http://jakarta.apache.org/tomcat/index.html for more Tomcat information.
5. This article explain how to execute commands in the terminal as root. Be careful in typing, and do not execute any other commands than those listed.
How to Enable Tomcat
1. Choose Log Out from the Apple menu.
2. Type "root" as the login user name. Enter your Admin user password, and log in.
3. Open TextEdit.
4. Choose Open from the File menu.
5. In the Go To field, type: /etc/httpd/
6. Locate and open the file named "httpd.conf".
7. Scroll to the end of this file, find the lines that read:
#LoadModule jserv_module /usr/libexec/httpd/mod_jserv.so
#AddModule mod_jserv.c
#Include /private/etc/httpd/tomcat.conf
8. Remove the pound signs (#) from the start of these lines. Do not modify them in any other way.
9. Save the file and quit TextEdit.
10. Open Terminal.
11. Type: /Library/Tomcat/bin/tomcat.sh start
12. Press Return. At this point you should see output in the shell showing Tomcat starting up.
13. After Tomcat has started, quit Terminal and choose Log Out from the Apple menu.
14. Log in as your Admin user
15. Open Server Admin and restart the Web server. At this point Tomcat will be running.
16. To verify this, set the document root of your Web site to "/Library/Tomcat/webapps/ROOT/", and visit your server in a Web browser.
17. If you are having difficulties, take a look at the log files in the Server Admin. Tomcat also keeps a log file in /var/log/http/ called 'mod_jserv.log' that you can use Console to read.