Installing an Configuring ColdFusion 9.01 on Tomcat 7
May 15, 2011 · 2 Comment s
At this years Scotch on the Rocks conference, Adobe announced that the next version of ColdFusion would be powered by Tomcat rather than the now somewhat long in the tooth JRun.
The version of Tomcat included will be an Adobe supported version, and in fact Adobe will be looking to standardise all their Java server on Tomcat.
In preparation for this, we (Fuzzy Orange) have been doing a lot of work behind the scenes with ColdFusion and Tomcat. This has been prompted by our own need to fast track our own expertise with Tomcat, but also because we've got some clients who are asking us about the move, plus the fact the community are going to need to some articles like those originally published by the likes of Steve Erat, Brandon Purcell and more back in 2002-2004 when ColdFusion MX and MX 6.1 were released.
Now, at this point we have no idea what the underlying application structure is going to look like for the next release of ColdFusion. Will they standardise on the directory structure so that Standard and Mult Server look the same? WIll there even be a multi server? Who knows ... everything at this point would be speculation.
One that we can be sure of is that we'll be able to perform WAR installations, and if you want to install ColdFusion upon Tomcat right now, that's the route to take.
SIDE NOTE: Whilst you can create a ColdFusion WAR file for installation using the developer edition, you do need an Enterprise license to run it in production.
So, as it's been a ridiculously long time since I last blogged, I thought I put together a number of posts related to running ColdFusion 9.01 on Tomcat 7. I would imagine these posts will be useful to those still running 8.01, and there may even be some elements that cross over into the Railo and OpenBD realm.
This first post is going to concentrate on getting ColdFusion 9.01 installed and configured on Tomcat 7. So let's get started.
Preamble
I'm going to cover the installation, configuration and other areas on all platforms, so OS X, Linux and Windows. There will be a couple of slight differences depending on your flavour of Linux, your version of Windows, etc.
We are not concerning ourselves with security best practices during this blog series. Check out the security lock down guide written by Pete Freitag to assist in this area http://www.adobe.com/products/coldfusion/whitepapers/pdf/91025512_cf9_lockdownguide_wp_ue.pdf
Pre-requisities
You need to grab yourself:
1. Apache Tomcat 7 http://tomcat.apache.org/download-70.cgi
2. ColdFusion 9.0 and ColdFusion 9.01 Update
=== Installing Apache Tomcat ===
There's no real installation as such required. Just download Tomcat 7, and extract the folder to
/Applications/apache-tomcat-7 (OS X)
/opt/apache-tomcat-7 (Linux)
c:\apache-tomcat-7
=== Creating a CF9.01 WAR file ===
We now need to create our 9.01 WAR file.
a. Run the CF9.0 installer file for your platform.
During installation the important screen/option is the Installer Configuration, as shown below:

Here we want to choose WAR file for installation to our Tomcat conifguration.
Choose an appropriate location to store your WAR file, e.e. /Application/ColdFusion9WAR
Once the installer has finished, fire up the ColdFusion 9.01 Updater for your platform.
Again, the important step in the installation, is shown below:

You now need to tell the installer where to find the WAR file you created previously, e.g. /Applications/ColdFusion9WAR/cfusion.war
The installer will then validate the chosen WAR file, and if OK, it will proceed with upgrading it to CF9.01.
If you look in your "installation" directory, you will now see:
cfusion.war // ColdFusion 9.01 WAR
cfusion.war_original // ColdFusion 9.0 WAR file
Keep both files, and in particular the cfusion.war file so that you can simply deploy this file in the future.
=== Deploy the ColdFusion 9.01 WAR to Apache Tomcat ===
Deploying a WAR file to Tomcat really couldn't be any simpler.
You simply take your WAR file and drop it into the Tomcat webapps folder:
/Applications/apache-tomat-7/webapps
/opt/apache-tomcat-7/webapps
c:\apache-tomcat-7\webapps
If Tomcat is running it will now automatically expand your WAR file into a folder called 'cfusion'. If not, then next time it is started, it will perform the auto-deployment.
=== Start Tomcat ===
If your Tomcat instalation is not started, then do so now by running the appropriate startup script for your environment:
/Applications/apache-tomcat-7/bin/startup.sh
/opt/apache-tomcat-7/bin/startup.sh
c:\apache-tomcat-7\bin\startup.bat
=== ColdFusion Administrator ===
You may be used to accessing the ColdFusion Administrator on port 8500 or 8300 (depending on whether you've previously run ColdFusion in Server Configuration or Multi Server Configuration mode) but Tomcat by default runs on port 8080
Let's check that Tomcat is indeed running by loading up in your favourite browser: http://localhost:8080
You should hopefully see the Apache Tomcat 7 dashboard.
Let's now try the ColdFusion Administrator, which by default can be found at: http://localhost:8080/cfusion/CFIDE/administrator
The additional 'cfusion' may look confusing to those not familiar with EAR or WAR installs, but this is the Context Root. I'm not going down the route of explaining the purpose of Context Roots, but I will say this:
* Context Roots must be unique
* You can set it to be "blank", which is effectively what happens for you duing a Server or Multi Server installation with ColdFusion right now.
You now have a working installation of ColdFusion 9.01 on Tomcat. We've still to deal with things like web server configuration, and that will be the topic of my next blog post, but for now, take a look around the Administrator and you'll see that it's *almost* identical.
Missing from the Administrator are:
Server Settings < Settings
* Enable Whitespace Management
Server Settings > Request Tuning
* JRun Master Request Limits
Server Settings � Caching
* Cache Web Server Paths
These settings are all provided by JRun. The only one that is of real significance if Enable Whitespace Management, and I'll cover that in a later blog post.
Till next time.....
Tags: ColdFusion · Tomcat

2 response s so far ↓
1 Mike Henke // May 16, 2011 at 2:23 AM
Matt Woodward has a couple posts also about CF Engines, Tomcat, and Apache like http://www.mattwoodward.com/blog/index.cfm?event=showEntry&entryId=60F08421-5F0A-41C9-940B3681A3D09D99 and http://www.mattwoodward.com/blog/index.cfm?event=showEntry&entryId=03233F6F-ED2C-43C7-AFF5FA2B3C3D845B .
Also I found grabbing the Railo or OpenBD installer then dropping a cf9 war in webapps pretty fast and easy without messing around with config files.
2 Mohammad Sahebjamee // May 23, 2011 at 3:47 PM
Leave a Comment