An Architect's View

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

An Architect's View

Entries for month: June 2013

Railo 4.2, Tomcat 7, Clojure - how simple could it be?

June 01, 2013 ·

Thanks to Shantanu Kumar, if you have Leiningen installed for Clojure development, creating a skeleton web application based on Railo 4.2.0 and Tomcat 7 that blends CFML and Clojure is as simple as running these commands:

  • lein new lein-servlet railo myapp
  • cd myapp
  • lein servlet run

At this point you have a mixed CFML/Clojure web application running on port 3000 and you'll be seeing the home page in your browser!

The first time you run the application, it will take a while to download all of the libraries, but once those are cached locally, it will start up pretty quickly.

Shantanu's Leiningen plugin doesn't use cfmljure so Clojure integration into CFML is fairly low-level but as a way to get a mixed CFML/Clojure environment up and running on the latest Railo release, this really can't be beat!

If you want to see these commands in action, here's a short screencast I recorded [requires Safari - but it will play on iPhone / iPad as well as Windows and Mac with Safari!] showing the whole process end-to-end (including my inability to type 'cd' correctly!). This is a 'first run' so you see the full download of all the Railo / Tomcat libraries but it will give you a flavor of the simplicity involved.

Tags: coldfusion · cfmljure · railo