An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Railo for Dummies Part I

March 23, 2009 ·

I think a lot of people are looking beyond Adobe's licensing model for ColdFusion and evaluating other options. Last year, when Broadchoice decided to use Amazon EC2 as our production deployment platform, we picked Railo to drive our CFML-based iPhone web application because of licensing issues. Whilst that has since been addressed (on a case-by-base basis by Adobe) enough to allow us to move our CF8-based CMS up to the cloud, we haven't had any problems with Railo and we're still using it in production. In fact, our WAR-based build and deployment process lends itself much better to Railo's smaller footprint than the huge-by-comparison WAR files from CF8. Recently I've been getting a lot of questions from people about installing and configuring Railo on a number of systems. The general complaint I hear is that the documentation is somewhat lacking in this area. Of course, this is something that a large corporation with massive resources - such as Adobe - can be expected to score highly on (even though people complain about Adobe's installation and configuration documentation too). Personally, I find Railo easy to install and configure but I'm fairly used to Java-based systems. That's not true for a lot of CFers so I figured I'd start a series of step-by-step posts going through a variety of installation and configuration scenarios for Railo. The two systems I have to experiment with are Mac OS X (Leopard) and Windows 7 Beta. I'm going to start with the very simplest development scenario and build up to a variety of production options.First off, I'll point you at a very useful blog post where Gert Franz pulls together over a dozen blog posts that cover a broad variety systems. Finally, on to the first and simplest installation I'm going to cover: Railo Express on Mac OS X. Download Go to the download page and under "Railo Express", pick the "All OS" zip file: This puts a 30MB ZIP file in your Downloads folder. You can expand the ZIP file (by double-clicking it). Starting Railo In the folder created from the ZIP file, simply double-click the start file. The first time, it'll ask you to confirm you want to run an application you downloaded from the Internet. Then it will start the Terminal application and run a command to start Railo. A new application will start, called org.mortbay.start.Main. That's the Jetty web server - ignore it (and don't try to Quit it!). After six or seven seconds, the Terminal window will show Started SelectChannelConnector @ to indicate that Railo is running. Do not close that window or Quit Terminal (because that will stop the server). That's it - Railo is running. Yes, after just six or seven seconds! Testing Browse to http://localhost:8888/. You'll see the Railo test page! A real application I'm going to be using ColdBox as an example (because I'm learning ColdBox) so we'll download ColdBox. I picked the "bundle" and that gave me a 5.2MB ZIP in my Downloads folder. I double-clicked it and dragged the resulting coldbox_2.6.3 folder to the webroot folder in the Railo directory created above and then renamed it to coldbox since that's what the framework will expect. Then browse to http://localhost:8888/coldbox/dashboard/ and you'll the ColdBox dashboard login. The default password is coldbox so type that and login (I had to look it up via Google and it's in the FAQ). You'll notice it detects it's on Railo and puts a link to the Railo admin in the top navigation - very slick! We want to create a sample application so we'll click Tools and enter the following information: Application Name railotest Application Location {navigate to the Railo folder and create a new folder called test and then choose that folder} We'll leave the rest of the options at their defaults and click Generate. It will ask us if we're sure we want to generate an application. Click OK. It will show you a list of files it generated - click on Open Application. You should see a new browser with a "Welcome to ColdBox" page. Congratulations! You've installed Railo and started it. You've installed ColdBox and created a new application and it all works! This is probably a good time to read My First ColdBox Application which explains what the dashboard generates and how that generated application works. It might be your first exposure to Luis's excellent documentation. Stopping Railo In the folder created from the ZIP file, simply double-click the stop file. The first time, it'll ask you to confirm you want to run an application you downloaded from the Internet. Then it will open a new Terminal window and run a command to stop Railo. Once both the original window and the new window show [Process completed], you can Quit Terminal. Next time I'll look at a basic installation of Railo on Tomcat.

Tags: coldbox · coldfusion · osx · railo

9 responses

  • 1 Ouz Demirkap1 // Mar 23, 2009 at 10:20 PM

    Great to hear that you are going to have these Railo series! Thanks Sean!

    A quick tip: In the Railo webadmin, there is a section as "Applications" where you can deploy most of the known frameworks or application easily including ColdBox. :)

    It is expected having some more application soon.

    Thanks again!
  • 2 Ouz Demirkap1 // Mar 23, 2009 at 10:25 PM

    I personally looking forward to hear your cloud experiences with Railo. We are also using for some of our load needs such as video/photo editing etc. and I really wonder how to configure in a better way on which cloud system.

    Looking forward to follow your CFUnited session too. :)
  • 3 Sean Corfield // Mar 23, 2009 at 10:31 PM

    @Oguz, yes, Railo admin has ColdBox 2.6.1 available for installation but the dashboard in that version doesn't work properly with Railo. I installed ColdBox 2.6.3 which works better with Railo. Still, it's a very nice (experimental) feature and I know the application / extension manager is going to be a showcase aspect of Railo soon!
  • 4 Jules Gravinese // Mar 24, 2009 at 4:12 AM

    I am a web developer and hope to get my own managed server when I have the clientele to support it. Licensing of software is one of the hurdles.
    I don't understand the whole Railo buzz, being an alternative to Adobe's licensing. CF8 is $1300, Railo is $3000.
    What am I missing? (I'm not much of a documentation reader!)
  • 5 Thomas Case // Mar 24, 2009 at 6:28 AM

    First off, thank you for the post. I look forward to future ones. I myself am currently exploring how ColdFusion, and later Railo/Bluedragon, operate in J2EE servers, instead of the default JRun setup. I have been looking at JBoss, but find the information conflicting, even from Adobe.

    Further, as it relates to your post and J2EE servers setups, what I find frustrating is understanding how to deploy applications. I am used to the JRun method, where you typically deploy the applications on the web listener (e.g., IIS or Apache), and not to the J2EE server itself. This method seems simple, especially when you want the application root outside of the main webroot. One creates a Virtual Directory on the Web Listener and a CF Mapping. With J2EE apps, I am finding little to no information on whether the same structure can work. There is plenty on doing what you did, which was deploy to the WAR root, and some on creating your own WAR/EAR deployments. Is the WAR/EAR deployments the only method, or is there a way to deploy the same way one currently does with IIS/Apache plus JRun/ColdFusion?
  • 6 Sean Corfield // Mar 24, 2009 at 7:12 AM

    @Jules, you need to compare apples to apples. ColdFusion and Railo are both free for development -of course - then ColdFusion has Standard Edition ($1,300) and Enterprise Edition ($7,500) whereas Railo has Community Edition (FREE) and Enterprise Edition ($3,000).

    @Thomas, yes, I'll be covering deployment scenarios in this series because of differences like that.
  • 7 jeff // Mar 24, 2009 at 8:21 AM

    Great. I've been hoping somebody would get into this for quite some time. Every few months I try to look at Railo again, and every time I end up stumped at some aspect of installation/configuration and end up abandoning it. I'm not a Java guy, but have 8 years CF experience on Windows platforms.
  • 8 salomoko // Mar 24, 2009 at 8:21 AM

    Awesome, sounds good Sean, excited your doing this (also playing with coldbox)! I am to starting play around with railo with my coldbox apps (as theres some newb questions on some of the groups)...

    looking forward to your apache/mod_coucho install...

  • 9 Sami Hoda // Mar 24, 2009 at 9:53 AM


    I am also taking the opportunity to learn Railo and ColdBox at the same time. Will be posting some notes as well.