An Architect's View

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

An Architect's View

Search Results for railo for dummies

Upgrading Railo 3 to Railo 4

October 23, 2013 ·

At World Singles, we're just going thru the process of upgrading from Railo 3 to Railo 4 (specifically from 3.3.4 to 4.1.1) and I thought I'd jot down a quick blog post about it. First off, I should explain that we use the WAR install on a vanilla Tomcat install, and mod_proxy_ajp to connect Apache to Tomcat. See my Railo for Dummies blog post from 2009 about setting up that sort of environment for background. We have three web contexts (web applications), each running their own configured WAR install of Railo, so we can package each web application up easily and move it around, including the Railo runtime. We can also upgrade each web application separately.

We'd already upgraded from Java 6 to Java 7 (download and unpack the JDK from Oracle into a new folder, update the symlink for the default java executable), and from Tomcat 6 to Tomcat 7 (download and unpack the Tomcat archive from Apache into a new folder, update the symlink for the current version, copy setenv.sh and context.xml from the old to the new - we'd customized those - and then add <Host..> entries to server.xml as necessary). Piece of cake so far.***

I expected the Railo upgrade to be more work than Tomcat. I was wrong. A pleasant surprise! I downloaded the new Railo 4.1.1 WAR file and unpacked it into a temporary folder (using jar xf /path/to/railo-4.1.1.009.war). Then I copied the WEB-INF folder over my existing Railo installations:

tar cf - WEB-INF | ( cd /path/to/application/webroot; tar xf - )

That's just my go to method for non-destructively copying a whole directory tree on top of an existing set of files. The only file that needed customization was web.xml in one web application context where we had some SES URL patterns that matched subfolders. That was just a matter of adding three <url-pattern> lines to the <servlet-mapping> section for the CFMLServlet. That's all it took: download, unpack, copy (and a small edit). Started up Tomcat and Railo happily deployed itself into each web application context, without overwriting any of my previous Railo 3.3.4 settings in the three admins. Nice!

Any code changes? Yes, just two: ColdBox has a MessageBox plugin that uses isEmpty() which is now a built-in function - changing the two unqualified calls to this.isEmpty() solved that - and a couple of strange places where I'd accidentally used float and int as function return types in cfscript - this worked in Railo 3 as if I'd written numeric but in Railo 4 it was type checked as a Java primitive type (interesting in itself!) so I just changed those to numeric and everything else just worked!

***Piece of cake except for Braintree which is one of our payment providers. We were using an older version of their library and once we moved to Java 7, the security certificate processing was more strict and calls to their sandbox (not their production system) failed. Updating to the latest Braintree JAR on Maven Central fixed that.

Tags: coldbox · coldfusion · railo

Railo for Dummies Part V

June 30, 2009 ·

I wanted to follow up on Part IV Appendix about SES URLs with Tomcat. Tony Garcia mentioned it there in a comment and since then Jamie Krug mentioned it in a comment on the Railo blog: Tomcat can do SES URLs, albeit with some limitations.

[Read more →]

Tags: coldfusion · railo

Converting corfield.org to Railo

March 28, 2009 ·

As you might imagine at this point in my Railo for Dummies series, I'm ready to try it on a real website such as my own. I've been running corfield.org on CFMX7 Standard Edition for a long, long time and never upgraded to CF8. Trying to run corfield.org on Railo has been on my 'todo' list for a long time as well and now seemed like as good a time as any. Here's how it went...

[Read more →]

Tags: blogging · coldfusion · railo

Railo for Dummies Part IV Appendix

March 28, 2009 ·

In the comments on Part IV, Barney suggested using AJP to proxy and I confirmed that it preserves the CGI variables REMOTE_ADDR and REMOTE_HOST which Paul Kukiel asked me about. Paul also noted that adding the ProxyPreserveHost directive causes the host headers to be passed through the proxy. I'd actually added that locally but didn't want to complicate the blog post by mentioning it. In this Appendix post, I want to tackle SES URLs. One downside of Tomcat is that it does not support the following common form of SES URLs: We're going to tackle this by changing our proxy strategy to use mod_rewrite.

[Read more →]

Tags: apache · coldfusion · osx · railo

Railo for Dummies Part IV

March 27, 2009 ·

After getting a very basic Railo+Tomcat setup running, now we're going to make it more robust and more 'production-ready' (you'll want to do more than I'm going to show so I'd refer you to the extensive Tomcat documentation for deeper configuration). I'm just going to show how to get Tomcat integrated with Apache in a couple of ways so you can run a 'real' website on it.

[Read more →]

Tags: apache · coldfusion · osx · railo

Railo for Dummies Part III

March 27, 2009 ·

Today, let's get Railo running on Tomcat! Why Tomcat? It's a robust, high-performance Java-based web server and Servlet engine and it's also very light and lean. Tomcat is also the basis of the JBoss Web Server (I'll probably cover JBoss later in this series) so all that you learn about getting things up and running on Tomcat can be carried over to JBoss when you need a full JEE server rather than "just" a Servlet engine.

[Read more →]

Tags: coldfusion · osx · railo

Railo for Dummies Part II

March 24, 2009 ·

I said I'd look at Railo on Tomcat next but I figured I'd just sneak in a quick Express for Windows post before that so folks don't think I'm forgetting all those PC users.

[Read more →]

Tags: coldbox · coldfusion · microsoft · railo

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.

[Read more →]

Tags: coldbox · coldfusion · osx · railo