Subversion with Coldfusion and Adobe Dreamweaver CS5

30. January 2013 08:53 by Mrojas in   //  Tags: , , , , , ,   //   Comments (0)

I found two great articles about using Dreamweaver with Subversion.

Part 1 is an introduction to subversion, an some general concepts about code versioning


Part2 is about confuring DreamWeaver to work with Subversion. An important aspect here is the directions on how to setup the file comparison tool. This is very important because in Subversion it is normal to have conflicts, but working without a nice file comparison tool can be a nightmare.

A couple of good comparison tools: SmartSVN (I really like this one but is commercial, but try it, it is very good) and Meld (you can download a version for windows from



Easy Deployment of Coldfusion Apps on the Cloud

24. January 2013 16:36 by Mrojas in   //  Tags: , , , ,   //   Comments (0)

There are now a lot of Cloud Offerings. Amazon, Azure and I also really like Jelastic!

Jelastic is a great hosting environment for Java and PHP, but can it be used for ColdFusion. Sure!!

They have a very nice guide:

Can you do the same with Azure or Amazon. Sure.

For example see this guide:

Once you have a vm with java you just deploy the coldfusion EAR and that's all :)


Coldfusion cfdocument bug with images and Windows Authentication

4. March 2011 16:52 by Mrojas in General  //  Tags: , , ,   //   Comments (0)

If you are running your Coldfusion Server with IIS7 and you use Windows Authentication you should be aware that you might
encouter a bug if you try to use a cfdocument tag like:

 <cfdocument format="pdf">

Hello World <img src="images/world.png">


The problem here is that Coldfusion will use http to get the image when building the PDF, and because this site uses Windows Authentication it crashes.

How to solve it?

 <cfdocument format="pdf" localUrl="true">

Hello World <img src="images/world.png">


This solves this bug and also improves perfomance because CF will convert images/world.png to a physical path like file://E:/images/world.png

Running Coldfusion on a Web Server Role

4. March 2011 15:43 by Mrojas in General  //  Tags: , , , , , ,   //   Comments (0)

I have been playing around with one of my test Azure Web Roles to determine
if it is possible to run it inside Azure, using a Web Role not just a VM Role.

So far I have been able to run Coldfusion 8 in a Web Role, but I have not been able to fully automate this task,
I had to do a remote desktop to the Web Role and perform the following tasks:

  • Add Features to the Web Roles particulary II6 Management Compatibility
  • Make sure that the Handlers for CFM, CFML, CFC are inplace

IIS Handler CF

  • And make sure that the ISAPI is ok:
  • Once all that is set you can run Coldfusion 8 in your Web Role. Now we just need to automate all the CF8 installation in a Web Role,
    but that will be something another post


ColdFusion 8 and JRockIt

15. June 2009 18:41 by Mrojas in General  //  Tags: , , , , , , ,   //   Comments (0)

JRockIt is an interesting Java Virtual Machine. I really admire the technology used in it. Well following Mike’s post about Memory Leaks in Coldfusion I was trying to configure the JRockit JVM to do some profiling on an important application.

But alas. Time just flies and things have change a lot since Mike wrote that post. So this is basically an update:

1) JRockit must be downloaded from: You must accept the license and also have an OTN Account (this is a free process). Download the right version for your platform. I tried the x86 version on my 64 bit server and it didn;t work, so use the version that fits better to your platform. However there is no 64 bit client version of Memory Leak and all the other nice client tools. But dont worry. Download both version 64 and 32 bits versions. You will use the 64 version for your server and the 32 bit version for monitoring.

2) Stop coldfusion server

3) Modify the jvm.config file. In my case it was in: C:\ColdFusion8\runtime\bin\jvm.config

comment out old java.home and add a new line like:
java.home=C:/Program Files/Java/jrmc-3.1.0-1.6.0/jre

In the java.args setting, remove parameter –Xbatch (dont know why, it just didnt work)

add a parameter like:

*In my case I also had to disable security in C:\Program files\Java\jrmc-3.1.0-1.6.0\jre\management\ with a line like:

4) Re start coldfusion

Coldfusion and Memory Problems

20. October 2008 05:59 by Mrojas in General  //  Tags:   //   Comments (0)

If you have heavy processes in Coldfusion a nice thing is to track them with the JVMSTAT tool.

You can get the JVMStat tool from

 And this post shows some useful information of how to use the tool with Coldfusion


cfgrid or ext grid change column align

23. October 2007 05:42 by Mrojas in General  //  Tags:   //   Comments (0)

If you are using Coldfusion MX 8 cfgrid or the excelent Ext library and
you want to change the aligment for the column then a simple way
to do that is:

Add an style block like

 .x-grid-col-0 {text-align:center}
 .x-grid-col-1 {text-align:left}
 .x-grid-col-2 {text-align:right}

And that's all just remember to change  .x-grid-col-n change the n for the column you want to modify.

Clean Up your Coldfusion application

22. October 2007 09:56 by Mrojas in General  //  Tags: ,   //   Comments (0)
Currently I'm working in some tools to clean
your code, whether it is VB, ASP or Coldfusion.

Mostly simple tools, but for now if you are a
ColdFusion Developer I want to recommend a nice
application called CF Project Cleaner
This tools lends you a hand so you can
get rid of unused files. The tool is not perfect. But it is always handy
to review your code.

Creating Excel files from Coldfusion

4. January 2007 05:55 by Mrojas in General  //  Tags:   //   Comments (0)
I  found a super interesting blog called Busy ColdFusion Developers' Guide to HSSF Features

HSSF is part of an open source java project that provides FREE OPEN SOURCE libraries to create Microsoft Office Files like Microsoft Word or Microsoft Excel.

So I was wondering could it be possible with Coldfusion to use those libraries. Specially now that Coldfusion MX relies heavily in Java. So I found this wonderfull blog that explains it all.


It just went to the HSSF download site:


The project that holds these libraries is called POI.

When you enter in those links there is a release directory and a bin directory. I downloaded the zip file and you will find three files like: poi-Version-Date.jar; poi-contrib-Version-Date.jar and poi-scratchpad-Version-Date.jar


I downloaded the 2.5.1-final version. I renamed my jars to poi-2.5.1.jar, poi-2.5.1-contrib.jar and poi-2.5.1-scratchpad.jar because my memory cannot hold those complex names for a long time. I installed the library in C:\POI and put them in the Coldfusion Administrator classpath




And then I created a test file like the following:


Note: I used a recommendation from Cristial Cantrell


    context = getPageContext();
    response = context.getResponse().getResponse();
 response.setHeader("Content-Disposition","attachment; filename=unknown.xls");

    out = response.getOutputStream();

<cfset wb = createObject("java","org.apache.poi.hssf.usermodel.HSSFWorkbook").init()/>
<cfset format = wb.createDataFormat()/>
<cfset sheet = wb.createSheet("new sheet")/>
<cfset cellStyle = wb.createCellStyle()/>
<!--- Take formats from: --->
<cfset cellStyle.setDataFormat(createObject("java","org.apache.poi.hssf.usermodel.HSSFDataFormat").getBuiltinFormat("0.00"))/>

<cfloop index = "LoopCount" from = "0" to = "100">
<!---  Create a row and put some cells in it. Rows are 0 based. --->
<cfset row = sheet.createRow(javacast("int",LoopCount))/>

<!---  Create a cell and put a value in it --->
<cfset cell = row.createCell(0)/>
<cfset cell.setCellType( 0)/>
<cfset cell.setCellValue(javacast("int",1))/>

<!--- Or do it on one line. --->
<cfset cell2 = row.createCell(1)/>
<cfset cell2.setCellStyle(cellStyle)/>
<cfset cell2.setCellValue(javacast("double","1.223452345342"))/>
<cfset row.createCell(2).setCellValue("This is a string")/>
<cfset row.createCell(3).setCellValue(true)/>


<cfset wb.write(out)/>
<cfset wb.write(fileOut)/>
<cfset fileOut.close()/>
<cfset out.flush()/>