Recent Posts

Nov 2 2014

Belt Sander Racing

What do you do if you have a new circular saw and heaps of wood from an old cubby house? Well Phil built a race track and invited his friends around to race belt sanders.

Inappropriate use of power tools - part one ...

0 comments - Posted by AJ Mercer at 6:34 PM - Categories: What cracks me up

Dec 7 2013

Multiple Railo Servers on one Tomcat install

I have been wanting to run multiple Railo servers on one machine (distinct from multiple web sites on one server). For example, a dev, test, and production Railo servers, or Public and Internal Railo servers. Earch Railo server would run on it's own port.

After messing around with WildFly, Glassfish and Geronimo, I discovered that Tomcat itslef can run multiple instances. Then I found this gem: Tomcat Instance Manager - bat files for windows that copy required directories and creats a bat file with environment variables.

I have now created a standard Railo directory structure that I can copy that has the Railo web.xml and server.xml files. So you copy and rename this directory, edit some files and an new environment is ready, well almost. You will need to get the Railo JARs and drop them into the lib folder. I download the Railo WAR and extract the lib and 'Welcome to Railo' app (this also has web.xml and server.xml). You can do this first and put into the template directory so it is set up for all copies. I kept it out to keep the download small. Also, for may want to drop the next Bleeding-Edge version into a new instance.


To start off, you need to get yourself Tomcat and save to your server. No need to run the service install, you just need the bin and lib folders.

Then you need a directory to hold all the server instance directories; I call mine servers. This is where you drop the Railo Directory Template (github URL here). There is also a directory for Tomcat Instance Manager.

The magic happens with environment variables. CATALINA_HOME points to the tomcat directory, eg d:\tomcat7. CATALINA_BASE points to the Tomcat instance directory, eg %CATALINA_HOME%\servers\railo8808. This is set up in the bat files. The Tomcat Instance Manager creats a bat file for each instance. This bat file accepts arguments to start and stop, and also create a windows service, and arguments to stop and start this.

2 comments - Posted by AJ Mercer at 4:59 PM - Categories: Railo Tomcat

Nov 25 2013

Railo directory placeholders

Railo has predifined directory placeholders that can be used in your code or servlet config.

In code:

{railo-web}: #expandPath("{railo-web}")#<br />
{railo-server}: #expandPath("{railo-server}")#<br />
{temp-directory}: #expandPath("{temp-directory}")#<br />
{home-directory}: #expandPath("{home-directory}")#<br />
{web-root-directory}: #expandPath("{web-root-directory}")#<br />
{system-directory}: #expandPath("{system-directory}")#<br />

Attach a log file to email

<cfmailparam file="#expandPath("{railo-web}")#\logs\GoogleBot.log" >

See details on using Railo directory placeholders in config files.

Posted by AJ Mercer at 10:03 AM - Categories: Railo

Previous Posts

Oct 20

Giant Pumpkin 2014

Posted by AJ Mercer at 10:36 AM - Categories: Giant Pumpkin |

Sep 23

Railo ReST API brain dump

Posted by AJ Mercer at 6:31 AM - Categories: CFML | Railo | ReST |

Aug 30

Railo can do NTLM Authentication

0 comments - Posted by AJ Mercer at 11:23 AM - Categories: CFML | Railo |

Aug 20

Nginx proxy for Railo with web sockets

Posted by AJ Mercer at 9:56 AM - Categories: Nginx | Railo | Web Sockets |