ColdFusion in Baltimore Rotating Header Image


ColdFusion (CFML) language gaining in popularity

According to TIOBE Index for July 2016, ColdFusion has moved up from #102 to #66. The list contains all languages, not just web languages, so being #66 is not too shabby but still way behind PHP and .NET. Even T-SQL is more popular than CFML on this list. But still, does this mean CFML is making a comeback?

My take is, YES!, and this is not the only indicator out there. One of the obvious indicators are the free CFML servers Railo, which is now Lucee, that have been very successful and have contributed to the rise in popularity of CFML. Licensing costs were the main culprit of ColdFusion’s decline and it’s no longer an issue.

But another indirect contributor to CFML’s re-emergence is perhaps the ever rising popularity of Agile and DevOps. The original concept and claim to fame of ColdFusion was that it was a faster way to develop web applications because of it’s simpler language and the bundled tools that made it easier to deploy. And you do not need to go through a complex systems design to develop and deploy ColdFusion apps.

Factual and ColdFusion

Here is how to use the Java driver from Factual in ColdFusion. I wish Factual would support CF. So I’m posting it for anyone to use, and turns out it’s really simple.


  1. You can either obtain the Java driver from Factual Github, and get all the dependencies from Maven, or you can download this complete jar package FactualJarLib. Unzip and place all the jar files in your ColdFusion lib folder, and restart the server to enable the driver. You can also dynamically load the jar files (google it).
  2. To use the driver, use the following code. You can substitute the table names and add other vars, just append them to the query string (factual_URL) as below.
  3. [coldfusion]
    // set query vars
    limit =20;
    place_type = 150;
    locality = "Baltimore";
    region = "MD";
    offset = 0;
    // create query string
    factual_url = ‘query.limit(#limit#).field("category_ids").includes(#place_type#).field("locality").includes("#locality#").field("region").includes("#region#").offset("#offset#")’;
    /// init driver, add keys
    factual = createObject("Java","com.factual.driver.Factual").init("yourApiKey", "yourSecret");
    // init Query object
    query = createObject("Java","com.factual.driver.Query").init();
    // evaluate built query string
    // submit string to query object
    q=factual.fetch("places", q);

    <cfdump var="#q#">

  4. That’s it!!!



Railux 4 (cfubuntu)

This is old, use this instead:

This version of the Railo CFML ColdFusion Virtual Machine Appliance has MySQL database and Ubuntu desktop. It has (almost) everything for Railo/ColdFusion development, including;


All the usernames (except MySQL which is root) and passwords are coldfusion 

Extract the files using WinRar, double click the VMX file (you’ll need the free VMWare Player), and choose “I copied it” when it first starts.

  • Log in to Windows (Xcfe) with password coldfusion
  • All the admin (Tomcat manager, Railo manager) URLs are bookmarked in Firefox (once you start Firefox in the VM, you will see them bookmarked in Firefox).
  • CFEclipse (under Start>Development Tools) defaults to an Apache virtual host named cfubuntu. This host is bookmarked in Firefox, as is the default host. 
  • The cfubuntu virtual host can be viewed from other computers only if you add it to your hosts file. e.g.         cfubuntu
  • If you need to add more virtual hosts, look at the Apache and Tomcat conf files. (in /etc/tomcat7 or /etc/apache2 — e.g. files are server.xml, web.xml, http.conf, etc) — since this topic is beyond the scope of this article, I won’t elaborate – but you can ask below.

This version is not locked down or hardened, it’s not for production.


Edit: Railo admin is not bookmarked. Browse to http://localhost:8080/railo —- password is coldfusion

Download here: (3 GB)







Railux 3.3 – A ColdFusion Application Server VM Appliance

update: this version is old, newer one is here and it has MySQL and Eclipse.

update:  fixed password issue,  working on enhancements (Eclipse, mySQL, etc)

With the release of Railo 3.3,  we now have Railux 3.3! This version is built on Damn Smal Linux (DSL) and is a base version with almost no configuration other than Railo with Tomcat.  This is so that you can customize it any way you wish.  It’s fast and light-weigth. You can also use this as a plain Tomcat server.


Creating dynamic thematic drill down maps ONLY with ColdFusion

Here is a step-by-step on how to create data driven thematic (choropleth) maps in ColdFusion. No other software needed. Who needs BI software?

1- Download the (shape file) and usa.xml (webcharts project -XML file)

2- Place into your X:ColdFusionWEB-INFcfusionlibmapsCountries directory

3- Edit the usa.xml file to  point to the file (line 6)

4- Get some data from somewhere. has data on Medicaid. I used the 2008 total $ paid.

And here’s the code..I used some code from Ray Camden’s thanks Ray.

[coldfusion]<!—set values and colors —>
minamount = minmax.minamount;
maxamount = minmax.maxamount;
lo_amount = minamount;
tenth = (maxamount-minamount)/10;
next_Amount = lo_amount+tenth;
row = 1;
<cfloop list=”#bluelist#” index=”value”>
row = row+1;
lo_amount = next_Amount;
tenth = (maxamount-minamount)/10;
next_Amount = next_Amount+tenth;

<!— Get base server url —>
<cfif len(CGI.HTTPS)>
<cfset baseURL = “https://”& CGI.HTTP_HOST &”/cfusion/”>
<cfset baseURL = “http://”& CGI.HTTP_HOST &”/cfusion/”>
<!— Extract chart style from the WCP file —>
<cffile action=”read” file=”#ExpandPath(‘rusa.wcp’)#” variable=”xmlResult”>
<cfset xmlResult = XmlParse(
REReplace(xmlResult, “^[^<]*”, “”, “all” )
) />
<cfset wcp = XMLParse(xmlResult)>
<cfset chartStyle = ToString(>
<!— Create chart data <cfdump var=”#usatotals#”>—>

<cfsavecontent variable=”chartModel”>
<?xml version=”1.0″ encoding=”UTF-8″?>
<map name=”USA”>
<cfoutput query=”usatotals”>
<!— set bg color —>
<cfloop query=”colorQ”>
<cfif usatotals.totalsum GTE lo_value AND usatotals.totalsum LTE hi_value>
<cfset backcolor = color>
<item name=”#st_desc#” backColor=”#backColor#” popup=”$(name)n$$(value)” value=”#NumberFormat(totalsum,”___.__,”)#”/> </cfoutput>
<!— Initialize chart settings —>
oMyWebChart = createObject(“Java”,””);
oMyApp = getPageContext().getServletContext();
oSvr = oMyWebChart.getDefaultInstance(oMyApp);
oMyChart2 = oSvr.newImageSpec();
oMyChart2.width = 720;
oMyChart2.height= 465;
oMyChart2.type = “png”; = “#chartStyle#”;
oMyChart2.model = “#chartModel#”;
<!— Create html tag set —>
<cfsavecontent variable=”chartImgTag”>
<cfoutput>#oSvr.getImageTag(oMyChart2, baseURL& “CFIDE/GraphData.cfm?graphCache=wc50&graphID=”)#</cfoutput>
<!— Good old Webcharts loves to add an extra /Images/ to the URL —>
<cfset chartImgTag = replace(chartImgTag, baseURL &”Images/”, baseURL, “All”)>

<span class=”important”>Medicaid Total Amount Paid –
FY<cfoutput>#url.fy# – #DollarFormat(grandtotals.totalsum)#</cfoutput></span><br />
(click a state to drill down)
<table width=”100%” border=”0″ cellpadding=”0″ cellspacing=”5″>
<td align=”left” valign=”top”><cfoutput>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”2″>
<tr bordercolor=”##000000″>
<td colspan=”2″ class=”style17″>Map legend (in millions)</td>
<td><span class=”style17″>Data unavailable </span></td>
<!— set colors and values —>
<cfloop query=”colorQ”>
<td bgcolor=”#color#”>&nbsp;</td>
<td><span class=”style17″>#DollarFormat(lo_value/1000000)# – #DollarFormat(hi_value/1000000)#</span></td>