Blog Archives - 5 Record(s)

Remove Filter Year: '2008' - Month: '12'

ColdBox 2.6.2 is now released, merry x-mas!!

Posted by Luis Majano
Dec 21, 2008 00:00:00 UTC

In full X-Mas spirit, here is my X-Mas Gift to the ColdFusion Community: ColdBox 2.6.2 Final Release codename series "FAITH". 

This is a major maintenance release that is full of joy and goodies.  There have been over 33 critical fixes to the core, over 4 major sample applications added, over 5 more documentation guides and about 30 nice little additions that will make you giggle with joy!! So what are you waiting for, download it now!

Enjoy it and don't bother me as I leave for vacation tomorrow to El Salvador, to enjoy lots of sun, beach, good food and family!!

Railo's cool serialize() method, serialize anything!

Posted by Luis Majano
Dec 16, 2008 00:00:00 UTC
I have been developing more and more on Railo and I am really liking some of its unique features due to its simplicity and total awesomeness. Here is a small tip on how to serialize complex objects such as queries, structures, arrays, and a whole gammut of all those types NESTED!!. All you need to do is call the serialize() method to convert the entire complex object into its string represenation. Then call evaluate() and Railo will evaluate the text back to its original object. EASY!!

At least much easier than trying to do serialization and deserialization with java. Anyways, I thought I would share this little tip:

myStruct = {fname:'Luis',lname:'Majano',great:'You Know it!!',




//Serialize the struct

MySerialization = serialize(myStruct);

writeOutput("MySerialized Structure: #MySerialization#");

//Reinflate it back.

NewStruct = evaluate(MySerialization);


Tip when creating case sensitive structure keys in ColdFusion

Posted by Luis Majano
Dec 16, 2008 00:00:00 UTC
This is a tip and reminder (I just spent like 10 minutes shouting why why why!!), of a very subtle difference when creating structures in CF. AT first glance creating something like the following will produce what you expect:

mappings = structnew();

mappings.FirstName = "Luis";

mappings.LastName = "Majano";

You would say that the keys for this structure would be "FirstName" and "LastName" would you? Well, the answer is NO!! The keys would be "FIRSTNAME" and "LASTNAME" because the are uppercased by CF. If you really want to keep case, then don't use dot notation but array notation:

mappings = structnew();

mappings["FirstName"] = "Luis";

mappings["LastName"] = "Majano";

By using array notation you are explicitly setting the key with the correct case. I re-discovered this gem by yes, UNIT TESTING, the ColdBox caching engine and some tests where failing because the keys could not be found. Well, DUUHHHH!!! You where assigning them wrong. Anyways, I thought I would share my stupidity on the matter and hopefully save someone or even myself in the future, the few minutes of "WHY WHY WHY!!"

Railo Resin Apache and Mac OS X A FAST Combination

Posted by Luis Majano
Dec 05, 2008 00:00:00 UTC
Installing Railo + Apache in Mac OSX

This step by step guide is to show you how to install Railo and create a connector to Apache in Mac OS X. I am now using Railo as my development environment due to its speed and strict coding that I can assign to it. This makes sure that every ColdBox release is what it is supposed to be. I am still amazed at how fast and stable Railo is and I highly encourage you to give it a shot!

Anyways, now for the fun.

1) Download Railo from

I downloaded the All OS download: (39 MB)

Once downloaded I unpacked it and installed it in


2) Remove some windows files, because I am a cleanup freak.

rm -rf httpd.exe setup.exe win32

3) Let's compile the apache connector by following these commands, but first cd into the Railo directory via your terminal.

$ cd /Applications/railo

$ ./configure --with-apxs=/usr/sbin/apxs --with-java-home=/System/Library/Frameworks/JavaVM.framework/Home


For java in 64 bit mode (snow leopard or leopard), use the following command:

./configure --with-apxs=/usr/sbin/apxs --enable-64bit

This should spurt out a long list of compilation checks and please look at my java home as my default jvm in my Mac. Once it finishes it should finish with the following:

configure: creating ./config.status

config.status: creating Makefile

config.status: creating modules/c/src/Makefile

config.status: creating modules/c/src/common/Makefile

config.status: creating modules/c/src/apache1/Makefile

config.status: creating modules/c/src/apache2/Makefile

config.status: creating modules/c/src/resin_os/Makefile

config.status: creating contrib/init.resin

config.status: executing depfiles commands

This means we are done. So now let's make and install the connector.

$ make

$ make install

After this, you should be A-OK. The script will copy to /usr/libexec/apache2/ and modify your apache conf with


# mod_caucho Resin Configuration


LoadModule caucho_module /usr/libexec/apache2/

ResinConfigServer localhost 6800

CauchoConfigCacheDirectory /tmp

CauchoStatus yes

Now it is up to you if you want to configure specifc virtual hosts to use resin or not. Example:

ServerName railo.jfetmac

DocumentRoot /Users/lmajano/Documents/MyDevelopment/

Options Indexes FollowSymLinks MultiViews Includes

DirectoryIndex index.html index.htm login.cfm index.php index.cfm

ResinConfigServer localhost 6800

CauchoConfigCacheDirectory /tmp

CauchoStatus yes

SetHandler caucho-status

Now we open the /Applications/railo/conf/resin.conf and add a few aliases that map our web application to apache:


After that just fire up apache and the resin server by running:


After that, the server runs and your application is up and running!!


Some people have not been able to compile mod_caucho because Apache is running in 64bit mode and the caucho mod is 32 bit mode. Here is some extra help for you:

Here's how to change your apache to run in 32 bit mode.



To switch Apache from running in 64-bit to 32-bit on Mac OS X 10.5, do the following:

1. Go to /usr/sbin and make a backup of httpd (for example,


2. Run the following command from the terminal:

sudo lipo httpd -thin i386 -output httpd

3. To confirm the resulting http architecture, from /usr/sbin, run

the following command:

file httpd

4. The file command should give httpd:Mach-O executable i386.

5. Restart Apache by running the following command:

sudo ./apachectl restart

6. The conf file (httpd.conf) location remains the same


Vote for ColdBox Sessions for CFUnited

Posted by Luis Majano
Dec 04, 2008 00:00:00 UTC
CFUnited has opened their voting for sessions and ColdBox needs your support, so please go here: and vote for our sessions.

Site Updates


Entries Search