Skip to content

Instantly share code, notes, and snippets.

@isapir
Created July 16, 2012 04:50
Show Gist options
  • Save isapir/3120633 to your computer and use it in GitHub Desktop.
Save isapir/3120633 to your computer and use it in GitHub Desktop.
Boilerplate web.xml for Railo servlet settings. This file should go into your site's /WEB-INF/ folder.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Railo4</display-name>
<servlet>
<servlet-name>CFMLServlet</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>Web Application Configuraton Directory. This is where Railo will look for configuration files like railo-web.xml.cfm and other customizations like custom tags, custom built-in functions, etc.</description>
</init-param>
<init-param>
<param-name>railo-server-root</param-name>
<param-value>C:/Programs/Railo4</param-value>
<description>Directory where Railo root is stored. You Should edit this value to point to the files that you downloaded and extracted from the Railo WAR</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>FileServlet</servlet-name>
<description>File Servlet for Static Files</description>
<servlet-class>railo.loader.servlet.FileServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfc</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>FileServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.cfm</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
</web-app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment