Tomcat and Coldfusion
Nov 18th, 2005 by Karen
Well, I got the one thing done today that I wanted to. That was to successfully get Coldfusion running on my Mac using Tomcat. I’m still working on getting Tomcat and Apache to play nicely together but at least I have the Coldfusion server running successfully. Doing this wasn’t an easy task so here are my personal instructions. I’ll include version numbers because this was something that was lacking when I was working on this. Also the directories I talk about are the default install directories for this package Tomcat and the ColdfusionMX 7 Developer edition.
- Download and install Tomcat by SW 5.5.12 - 1.2 package from Softpedia
Tomcat is installed by default in /Library/Tomcat/apache-tomcat-5.5.12
Scripts for starting and stopping Tomcat are placed in /Library/Scripts/Tomcat - Go to http://localhost:8080 and test to make sure Tomcat is working properly
- Go to the Macromedia site and Download the Developer Edition of Coldfusion MX 7
- Extract and install package. When prompted, do the following:
- Select Developer Edition.
- Select J2EE configuration/WAR file
- Specify the installation directories for ColdFusion MX and the Search Service.
- Select the Java Servlet API 2.3 or greater option.
- Specify a password for use with the ColdFusion MX Administrator.
- (Only if RDS is enabled) Specify a password for use with Remote Development Services (RDS).
The Install Wizard places the cfusion.war and rds.war files in the installation directory.
- Stop the Tomcat Server and Copy the cfusion.war and rds.war files from the installation directory to the webapps directory
- Rename the rds.war file to CFIDE.war (CFIDE must be all capital letters).
- Start your Tomcat server.
Tomcat automatically detects the presence of the cfusion.war and CFIDE.war files, autodeploys them, and creates expanded cfusion and CFIDE subdirectories.
Note: These instructions assume that you do not change the name of the cfusion.war file, which means that Tomcat deploys ColdFusion MX with a context root of cfusion. - Stop the Tomcat server.
- ColdFusion MX 7 includes a 1.4.2 version of the tools.jar file. If Tomcat uses a different JDK version, rename your tomcat_root/webapps/cfusion/WEB-INF/cfusion/lib/tools.jar file to something else (for example, tools.old).
- Remove ColdFusions commons-logging jar files from the following locations:
WEB-INF/cfform/jars/commons-logging.jar
WEB-INF/cfusion/lib/commons-logging-1.0.2.jar
WEB-INF/cfusion/lib/commons-logging-api-1.0.2.jar
- Create a setenv.sh file in the /Library/Tomcat/apache-tomcat-5.5.12/bin directory
The file will have the following lines.# Establish variables. CF_WEB_INF="/Library/Tomcat/apache-tomcat-5.5.12/webapps/cfusion/WEB-INF" # Add binary file directories to the system path. CF_SHARED_LIB=$CF_WEB_INF/cfusion/lib LD_LIBRARY_PATH="$CF_SHARED_LIB:$LD_LIBRARY_PATH" # Establish graphics JVM options. CF_GRAPHICS_JVM_OPTIONS="-Djava.awt.headless=true" # Set JVM options for CORBA. Use if vbjorb.jar is not in your JRE's # lib/ext directory. If used, append $CF_CORBA_JVM_OPTIONS to CF_JVM_OPTIONS. # CF_CORBA_JVM_OPTIONS=-Xbootclasspath/a:"$CF_WEB_INF/lib/vbjorb.jar" CF_JVM_OPTIONS="$CF_GRAPHICS_JVM_OPTIONS" JAVA_OPTS="$CF_JVM_OPTIONS -Xms128m -Xmx256m" export LD_LIBRARY_PATH
- Start the Tomcat server and monitor startup messages and log files to ensure that all configurations were applied successfully.
- Start the ColdFusion MX Administrator and run the Configuration Wizard. You start the Administrator going to the following URL - http://hostname:portnumber/cfusion/CFIDE/administrator/index.cfm
- hostname - The machine name, IP address, localhost, or 127.0.0.1.
- portnumber - The port number of the Tomcat web server (typically 8080).
I’ll talk later about how to get Tomcat to talk to Apache so that you can route requests for JSP and Coldfusion pages through Apache.

