Before you start with the steps below put your current version of Stuffit Expander into the trash can. You can put it back after you are through with the installing. [Editor's note: I think you could also just make sure that you uncheck "tar" and "gz" files in Expander's "Internet" prefs, but haven't tested that myself.]
Read the rest of this article for a step-by-step on getting Tomcat running locally. I am working on a solution to set up Tomcat with Apache at the moment and will post a follow up on this. If anyone has Tomcat 4.0 with Apache on 10.1 running, please post a solution or any helpful comments.
How to install Tomcat on OS X 10.1:
- Open the terminal and get root access.
Example: [co3029016-a:~] christia% su
Password:
- Navigate to the folder you want tomcat running; my path is /Library/WebServer/
- Get the jakarta-tomcat-4.0.tar.gz build:
curl -O http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/jakarta-tomcat-4.0.tar.gz
- Rename the file jakarta-tomcat-4.0.tar.gz to jakarta-tomcat-4.0.tar
- Unzip the file: gnutar zxf jakarta-tomcat-4.0.tar
- Set your environment for CATALINA_HOME and JAVA_HOME:
setenv CATALINA_HOME /Library/WebServer/jakarta-tomcat-4.0
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home/
- Navigate to the bin directory in your jakarta-tomcat-4.0 folder and type "./startup.sh" in the terminal or call it with the CATALINA_HOME variable.
- Open your browser and type "http://localhost:8080/" and you will see the index page of your tomcat folder.
- Open the Terminal (by default you are in your home directory, to make that sure try pwd (print working directory) to show you your current path. If it is not your home directory change into it by cd $HOME)
- Create the .tcshrc file: touch .tcshrc
- Edit the .tcshrc file: open -e .tcshrc
- Enter the following lines:
setenv CATALINA_HOME /Library/WebServer/jakarta-tomcat-4.0
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home/
- Don't forget to enter a return after the last line.
- Save it and restart the Terminal

