Install Railo in Tomcat – where do I put my files?

This is repost of my contribution to the Railo Google Group.

Goal

You are a Railo and Tomcat newbie and you want a directory to put your coldfusion files in. “tomcat\myapp\ROOT” would do nicely

Preconditions (for me anyway)

  • 64 bit Windows 7 home premium
  • UAC turned off and stays off
  • Java installed and JAVA_HOME set

Main Success Scenario

  1. Download Windows distribution
  2. Install to C:\railo
  3. Go to windows services and verify that Apache Tomcat Railo is running
  4. go to http://localhost:8888/index.cfm and the welcome to Railo should render
  5. <Comment> This page has a link to documentation called “creating new virtual hosts”. Note that this refers to Jetty and Resin but not Tomcat – hence this post </Comment>
  6. Use the Windows services control panel to stop Tomcat
  7. In your Windows hosts file (C:\Windows\System32\drivers\etc\hosts)
  8. create the entry:
    • 127.0.0.1          myapp # Tomcat uses the host name to identify the requested application.
  9. create the directory c:\railo\tomcat\myapp
  10. create \myapp\ROOT. (This is where you will keep your application’s .cfm files)
  11. create \myapp\ROOT\index.cfm with the contents <cfdump var= “#CGI#”>
  12. goto “C:\railo\tomcat\conf\Catalina\
    1. create the directory \myapp
    2. copy \localhost\manager.xml to \myapp and rename it to ROOT.xml
  13. Edit C:\railo\tomcat\conf\server.xml
    1. Find the <Engine></Engine> node and insert
    • <Host name=”myapp” appBase=”myapp”>
    • <Context path=”keyapt” docBase=”C:\railo\tomcat\myapp” />
  14. Restart Tomcat. You will see /myapp/WEB-INF and /myapp/ROOT/WEB- INF directories appear by magic.
  15. Browse to http://myapp:8888/index.cfm and you should see the cfdump (Update 2011 Mar 29 – corrected URL)
  16. The goal is complete

Caveats

I am a complete newbie and although this is working for me I don’t know whether it is the right way to do it.

6 responses to “Install Railo in Tomcat – where do I put my files?”

  1. Dr. Bayley – found this post yesterday and while it may not be the proper procedure it seems to work just fine as far as I’ve taken it. The only thing I had to add to make the page display properly in the browser was to correct the url to

    http://myapp:8888/index.cfm

    Thank you for taking the time to publish this information – I had previously spent hours trying to figure out how this all should work!
    Regards, John

    • Thanks for the feedback Ted. I have verified that at step 13

      Context path=”keyapt” docBase=”C:\railo\tomcat\myapp”

      is the correct setting for my installation. So if you have ROOT in there I guess that at step 15 you will be browsing to http://myapp:8888/ROOT/index.cfm but I have not verified this. James

Leave a comment