Installing Railo ColdFusion under IIS on Windows
Railo is an alternative ColdFusion application server. The developers have been very generous to release a free Community edition for small business use.
I decided to use a more manual installation rather than use the bundled versions provided by Railo so I could better understand what was going where.
Note that I am only describing setting up a server to host a single website, which will be the default website within IIS.
1) Download the components
To get started you will need the current versions of the following software:
Sun's JDK
http://java.sun.com/javase/downloads/index.jsp
I used JDK 5.0 Update 6
Resin Application Server
http://www.caucho.com/download/index.xtp
I used the Open Source version 3.0.21
resin-3.0.21.zip (6.3M)
Railo
http://www.railo.ch/en/index.cfm?treeID=224
In this case I download the Railo Custom version 1.0.0.027 JARs only
railo-1.0.0.027-jars.zip (16 MB)
2) Install the JDK
I installed Sun's JDK 1.5 in the directory c:\jdk1.5.0_06
Set the JAVA_HOME environment variable to point to this location (My Computer -> Properties -> Advanced -> Environment Variables)
JAVA_HOME=c:\jdk1.5.0_06
3) Install Resin
I unzipped Resin to the following directory c:\resin-3.0.21
Set up a RESIN_HOME environment variable to point to this location
RESIN_HOME=c:\resin-3.0.21
4) Test Resin
Open a DOS prompt and change to the Resin install directory and start the server by typing
httpd
This will open a control window that allows you to start and stop the server as required, as well as displaying some start up information in the DOS window:
Resin-3.0.21 (built Thu, 10 Aug 2006 12:03:19 PDT)
Copyright(c) 1998-2006 Caucho Technology. All rights reserved.
Using Resin(R) Open Source under the GNU Public License (GPL).
See http://www.caucho.com for information on Resin Professional,
including caching, clustering, JNI acceleration, and OpenSSL integration.
Starting Resin on Mon, 06 Nov 2006 10:49:04 +1100 (EST)
[10:49:05.437] Server[] starting
[10:49:05.437]
[10:49:05.437] Windows XP 5.1 x86
[10:49:05.437] Java 1.5.0_06-b05, 32, mixed mode, sharing, Cp1252, en, Sun Microsystems Inc.
[10:49:05.437] resin.home = C:\resin-3.0.21
[10:49:05.437] server.root = C:\resin-3.0.21
[10:49:05.437]
[10:49:05.515] Host[] starting
[10:49:05.656] WebApp[http://localhost:8080] starting
[10:49:06.125] WebApp[http://localhost:8080/resin-doc] starting
[10:49:06.218] WebApp[http://localhost:8080/resin-admin] starting
[10:49:06.281] http listening to *:8080
[10:49:06.328] hmux listening to localhost:6802
[10:49:06.328] Resin started in 1000ms
Test Resin is working by opening a web browser and go to:
http://localhost:8080
This should display the Resin default home page.
The file being displayed in located at the Resin web apps root directory:
c:\resin-3.0.21\webapps\ROOT\index.jsp
Next go to
http://localhost:8080/resin-doc
(or click on the Documentation is available here link from the default home page).
This should display the Resin documentation
5) Configuring Resin with IIS
First stop Resin using the Resin control window (you don't need to Quit the application).
In the Resin /win32 directory is the isapi_srun.dll file.
Copy this file to c:\inetpub\wwwroot\scripts (create the target 'scripts' directory if it does not already exist).
Go into IIS and create a virtual directory named 'scripts' off the default website that points to this directory. Ensure the Execute access permission is selected.
Next, go to the properties of your default website within IIS and select the ISAPI Filters tab.
Click 'Add ...' to add a new filter with the following details:
Filter Name: Resin
Executable: c:\inetpub\wwwroot\scripts\isapi_srun.dll
Next, restart IIS. You can use the following DOS commands:
net stop w3svc
net start w3svc
or restart the World Wide Web Publishing service from the Services panel.
Now restart the httpd service from the DOS prompt.
Also, stop and start the default website from within IIS.
Go back into your default website properties again and back to the ISAPI Filters tab. The Resin filter should have a green arrow pointing up beside it. If it is a red arrow pointing down then is it not working. Have a look at the 'more help' links at the bottom of this page.
6) Test Resin is working via IIS
Change your IIS default website to point to
c:\resin-3.0.21\webapps\ROOT
This will be the location for your Resin served web application
Create a test.jsp file in this directory containing the line:
Now, browse to
http://localhost/test.jsp
This should display the result
2 + 2 = 4
7) Installing Railo
Stop the httpd service
Unzip the railo-1.0.0.027-jars.zip file and copy all of the files in the Resin /lib directory
Next, modify Resin's /conf/app-default.xml and add the following just before the </web-app-default> tag
servlet-name="CFMLServlet"
servlet-class="railo.runtime.servlet.MultiWebCFMLServlet">
<init-param>
<param-name>configuration</param-name>
<param-value>/WEB-INF/railo/</param-value>
<description>Configuraton directory</description>
</init-param>
<load-on-startup>1</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>
Next, add two additional entries to the <welcome-file-list> section:
<welcome-file>index.cfml</welcome-file>
Start the httpd service.
8) Testing Railo
Create a file c:\resin-3.0.21\webapps\ROOT\test.cfm
Add the following line to the file
Browse to http://localhost/test.cfm
This should display the current date and time plus some standard Railo debugging messages.
9) Starting Resin as an NT Service
Stop the httpd service and quit the application.
Go to the Resin directory in DOS and enter
httpd -install
Then start the service with
net start resin
From this point onwards you should not need to execute the httpd application any longer.
More Help
For more information you can look at the following sites
Resin with IIS Documentation http://www.caucho.com/resin-3.0/install/cse-iis.xtp
Installing Railo with Resin http://www.railo.ch/en/index.cfm?treeID=215
Good luck!

My understanding is that Railo needs a 'Java Servlet Container' to run within - which is what Resin provides. In other words to use Railo, you need to have JSP support first (i.e your servlet container) then Railo ColdFusion will work fine for you.
So the short answer is yes, you do need Resin, or another servlet container package.
This is server 2003 with iis 6. jdk1.6.0_03. My iis site home directory is "C:\resin-3.1.3\webapps\ROOT"
I can load a jsp's using localhost:8080 and I can load an html page using localhost, but I can't load anything jsp-related over localhost (80).
I get the green arrow in isapi, I double checked all of my environmental variables and replaced the isapi_srun.dll, just in case. Website permissions are wide open (this is a test box).
Any advise would be appreciated.
Not sure - have not tried to set up on Win2004, but couple of ideas:
1) Resin has some additional notes for II6/Win2003 at:
http://www.caucho.com/resin-3.0/install/cse-iis.xt...
2) It's possible that your JDK version may be the problem. I would try downloading an older 1.4.* version and setting your JAVA_HOME accordingly:
JAVA_HOME=C:\j2sdk1.4.2_12
That brings me to my next dilema... setting up a datasource. All of the documentation I have found says to direct my browser to http://webroot/railo-context/admin/web.cfm, but it is not there. I used the railo-2.0.0.010-jars.zip for the install. This only included the jars files. Did I use the wrong install package? If not, how do I set up a datasource once teh ODBC ds is created in windows?
http://www.houseoffusion.com/groups/railo-talk/
Railo forum:
http://groups.yahoo.com/group/railo_talk/
Open Blue Dragon forum:
http://groups.google.com/group/openbd/
Good luck!