919 - 926 - 9847

How to configure a kick ass development setup - day 3

Today, we'll deploy Railo on Tomcat 6.  Note, I'm doing this the "hard way".  Jorden, from viviotek, created a handy dandy installer.  But, I rather like to install this stuff by hand so I can know what to fix should it break.  Pretty much all of this info is gleaned from Sean Corfield and his blog about installing various bits and pieces.  You can find it here.

  • Grab Tomcat 6 from http://tomcat.apache.org/download-60.cgi. I used the Core:32-bit windows zip
  • Edit your JAVA_HOME environment variable to point to c:\cf_dev\<jdk you downloaded previously>
  • Unzip it to c:\cf_dev and rename the folder to tomcat6
  • Go grab the Railo JAR files from http://www.getrailo.org/index.cfm/download/.  
  • Unzip these files to c:\cf_dev\tomcat6\railo
  • Open up c:\cf_dev\tomcat6\conf\catalina.properties and find common.loader=.  Add ${catalina.home}/railo,${catalina.home}/railo/*.jar to that line.
  • Open up c:\cf_dev\tomcat6\conf\web.xml At the end of the servlet section, just before the servlet-mapping section, add the following:
    <servlet>
       <servlet-name>RailoCFMLServlet</servlet-name>
       <description>CFML runtime Engine</description>
       <servlet-class>railo.loader.servlet.CFMLServlet</servlet-class>
       <init-param>
    <param-name>configuration</param-name>
    <param-value>/WEB-INF/railo</param-value>
    <description>Configuration directory</description>
    </init-param>  
       <!-- init-param>
    <param-name>railo-server-root</param-name>
    <param-value>.</param-value>
    <description>directory where railo root directory is stored</description>
    </init-param -->
       <load-on-startup>1</load-on-startup>
    </servlet>  
    <servlet>
       <servlet-name>RailoAMFServlet</servlet-name>
       <description>AMF Servlet for flash remoting</description>
       <servlet-class>railo.loader.servlet.AMFServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
    </servlet>  
    <servlet>
       <servlet-name>RailoFileServlet</servlet-name>
       <description>File Servlet for simple files</description>
       <servlet-class>railo.loader.servlet.FileServlet</servlet-class>
       <load-on-startup>2</load-on-startup>
    </servlet>
  • At the end of the servlet-mapping section, just before the filter section, add the following:
    <servlet-mapping>
       <servlet-name>RailoCFMLServlet</servlet-name>
       <url-pattern>*.cfm</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
       <servlet-name>RailoCFMLServlet</servlet-name>
       <url-pattern>*.cfml</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
       <servlet-name>RailoCFMLServlet</servlet-name>
       <url-pattern>*.cfc</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
       <servlet-name>RailoAMFServlet</servlet-name>
       <url-pattern>/flashservices/gateway/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
       <!-- could be RailoFileServlet -->
       <servlet-name>default</servlet-name>
       <url-pattern>/</url-pattern>
    </servlet-mapping>
  • At end of the file, add index.cfmto the list of "welcome files".
  • Open a command prompt, and run c:\cf_dev\tomcat\service.bat install to create a handy windows service

That's it!  We now have Tomcat + Railo rolling on our machine.  We're still missing the site definition, but that's a task we'll handle after we have Apache up and running.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)