As you have probably heard, Adobe has released a public beta of ColdFusion 10 - code name Zeus. After many many months of meetings, gathering feedback from clients and developers, dropping hints, and demoing new features, the wonderful engineering team has finally unleashed ColdFusion 10 on the general public.
Now that I've got that out of my system, I wanted to quickly talk about setting up ColdFusion 10 on my MacBook Pro. As a ColdFusion developer and blogger, I have a "testing" folder on my local machine in which I do pretty much all of my research and development. I installed ColdFusion 10 beta as a standalone server; but, I didn't necessarily want to start coding in the ColdFusion 10 beta webroot. Really, what I'd like is to keep all of my files in my standard "testing" directory, but run them through Apache Tomcat.
I know that the Mac OSX operating system can create links and aliases. I don't know much about them; but, it seemed like this might be exactly what I needed. So, I went into the "wwwroot" folder of my ColdFusion 10 beta standalone server:
... and I created a symbol link to a "coldfusion10" subdirectory that I created in my main "testing" directory:
ln -s /Sites/bennadel.com/testing/coldfusion10/ coldfusion10
This created a new directory in my ColdFusion 10 beta webroot that actually pointed to my testing directory:
ben-2:wwwroot ben$ pwd /Applications/ColdFusion10/cfusion/wwwroot ben-2:wwwroot ben$ ls -l total 16 CFIDE WEB-INF cfdocs coldfusion10 -> /Sites/bennadel.com/testing/coldfusion10/ crossdomain.xml
This looked awesome! However, when I went to access this webroot in my browser - http://http://127.0.0.1:8500 - there was no "coldfusion10" item listed in the directory contents.
After some Googling, this turned out to be a security measure on behalf of Apache Tomcat - the new servlet container that's replacing JRUN. I don't pretend to understand how J2EE servers or servlet containers work; but, according to the documentation, I had to explicitly enable symbolic links in the Tomcat context.
In order to do this, I had to edit the server configuration file:
Within this file, I had to uncomment the Context XML node and add the "allowLinking" attribute:
<Context path="/" docBase="/Applications/ColdFusion10/cfusion/wwwroot" allowLinking="true" WorkDir="/Applications/ColdFusion10/cfusion/runtime/conf/Catalina/localhost/tmp"> </Context>
When I uncommented this XML element, I had to replace the value "<cf_home>" with the path to my cfusion folder, "/Applications/ColdFusion10/cfusion". Notice that this Context element has (allowLinking="true") - this is what tells Tomcat that it is OK (from a security standpoint) to follow symbolic links in the web directory.
After I updated the server.xml file, I had to restart the ColdFusion 10 service. To do this, I executed the "coldfusion" command in my Mac OSX terminal:
/Applications/ColdFusion10/cfusion/bin/coldfusion stop /Applications/ColdFusion10/cfusion/bin/coldfusion start
Once I did this, my "coldfusion10" directory started showing up in my ColdFusion 10 beta standalone webroot. Now, I can keep all of my ColdFusion 10 research and development (R&D) code in my standard R&D folder. Pretty sweeeet!
As a side note, ColdFusion feels pretty snappy running on Apache Tomcat. Granted, the pages that I am running are local and have a tiny amount of code on them; but, the pages just feel like they load instantaneously. It might be all in my mind, but Tomcat feels like it will bring some decent performance improvements.