Want a free ticket to CFUnited?
http://www.railo.ch/blog/index.cfm/2009/7/14/Win-a-CFUnited-ticket
http://www.railo.ch/blog/index.cfm/2009/7/14/Win-a-CFUnited-ticket
Finally, a way to interact with java nulls easily. So all you do to create null values is do
What if you need a null value?
Two very simple functions, but they sure make life so so so much easier when integrating with java. This to me are my favorite two new functions.
Let's say I have a method that returns an array. Example below:
As you can see, a very simple example. So now, in my code outside my method I want to be able to access let's say item number 3 from the method call and the key called awesomeLevel from the structure call. Then I can do this:
How cool is that, finally!! Array syntax from method calls.
Let's say you want to assign a value to multiple variables in coldfusion. You would usually do this:
That is really neat right, well, Railo makes it fun!
How about that!! I can assign values to multiple variables, by just concatenaning the equals. Keep exploring Railo and you will find some nice hidden gems.
I like this! No more noisy semi-colons. Just beware that if you are doing multiple statements on a single line, you will actually HAVE to put in the semicolons.
A part from that, I love it!
The websites look phenomenal and we also get a documentation website powered by Codex. I wonder who did the initial documentation?
You can download the open source version of Railo from their nice downloads page.
At least much easier than trying to do serialization and deserialization with java. Anyways, I thought I would share this little tip:
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 http://railo.ch/en/index.cfm?treeID=224
I downloaded the All OS download: railo-3.0.1.000-resin-3.1.2-without-jre.zip (39 MB)
Once downloaded I unpacked it and installed it in
2) Remove some windows files, because I am a cleanup freak.
3) Let's compile the apache connector by following these commands, but first cd into the Railo directory via your terminal.
Update: 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:
This means we are done. So now let's make and install the mod_caucho.so connector.
After this, you should be A-OK. The script will copy mod_caucho.so to /usr/libexec/apache2/mod_caucho.so and modify your apache conf with
Now it is up to you if you want to configure specifc virtual hosts to use resin or not. Example:
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!!
Update 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.
From Adobe.com --------------------------------------------- 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, httpd.back). 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 (/etc/apache2).
What: ColdFusion Camp 2008
When: November 27th from 9am to 6pm
Where: Conference center Orbis, Oberschleißheim
Price: 35 Euros!
You can find more details at http://www.cfug.de
Would this be a bug on the Adobe cf java proxy? It seems to me, because the same tests on Railowork (even faster to say the least)!!
To reproduce this error, just try this below:
The length is #myBuffer.length()#
The error that Adobe CF produces is that the method length() does not exist. The only workaround for this is by lengthing the string produced, but it will definitely be slower than a direct length call: