Skip to content

Installation: JAR File Deployment

dbanttari edited this page Sep 14, 2013 · 2 revisions

JAR file deployment

These directions currently apply specifically to Tomcat.

${TOMCAT_HOME} refers to the top-level directory where you installed Tomcat.

A JAR file deployment allows you to configure Railo to run for all Hosts running under Tomcat without additional per-host configuration. It also reduces the size of the overall deployment by sharing jars across all hosts, instead of each host having a complete set of Railo jars.

  • Unpack the Railo "jar files" archive (.zip or .tar.gz) into a directory called ${TOMCAT_HOME}/railo
  • Edit the ${TOMCAT_HOME}/conf/catalina.properties file. Add ",${catalina.home}/railo/*.jar" to the end of the "common.loader" line (Don't miss the comma!)
  • Edit the ${TOMCAT_HOME}/conf/web.xml file. Find the line with the comment, "Built In Servlet Mappings". Just _before_ that line, paste the following code:
	<!--  Begin Railo Mappings  -->
	<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>
	<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>
	<!--  End Railo Mappings  -->
  • Restart Tomcat
For more information, see http://corfield.org/entry/Railo_on_Tomcat__multiweb
Clone this wiki locally