Railo on Apache / Tomcat - Windows (Part 1)

Installing Railo with Apache / Resin on Windows is really easy to do, I have done that before and pretty happy with the setup. So why do I bother going back to square one with getting Railo on Apache / Tomcat instead? Well the reason is really simple, my hosting environment at Viviotech is set up this way - so I guess it’s a good idea for me to familiarize myself with Tomcat, I’m pretty sure the knowledge would be handy when I run to problems in the future.

The good news is: setting Railo using Apache / Tomcat isn’t too hard either. This is the part 1 - which gets me to run Railo on Tomcat, on part 2 - I will be looking at connecting Apache to Tomcat.

This post is really based on Sean Corfield’s entry: Railo on Tomcat Multi Web. But I personalized to my experience, also in my case I do the installation in Windows not Linux.

I tried as much as I can to follow the folder convention on my hosting environment - it will be slightly different as the hosting is using CentOs and I am using Windows XP.

I downloaded tomcat 6.0.20 (ZIP) from http://tomcat.apache.org/download-60.cgi. I unzip it to c:\opt\railo\tomcat

Now I downloaded Railo from http://www.getrailo.org/index.cfm/download/ - get the one under Custom - All OS - ..jars.zip.

Now I unzip the jars to this directory: c:\opt\railo\lib

Now we need to tell Tomcat to load Railo classes when the server starts up - we can do so by editing catalina.properties on c:\opt\railo\tomcat\conf  - find a common.loader section and append the railo bits at the end:

common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,c:\opt\railo\lib\*.jar

Now head off to Sean’s entry - grab the servlet and servlet mapping bits from there.

One last thing - you need to set JAVA_HOME or JRE_HOME system properties before we ready to rock and roll. Depending on which java you want to use. On my case - my latest java version is in this directory: C:\Program Files\Java\jre1.6.0_07

So using DOS prompt I run the following:

set JRE_HOME=C:\Program Files\Java\jre1.6.0_07
cd c:\opt\railo\lib
startup.bat

Now browse to localhost:8080 - and voila you should see Tomcat page in all its glory. Now test whether Railo is loaded OK by going to http://localhost:8080/railo-context/admin/web.cfm

I will stop here, I haven’t configured a site on this setup nor have I done connecting Apache to Tomcat - I hope I can do that sometimes soon.