Installing Railo 3 on JBoss 4.2.2

In the previous post I made about Railo I translated an entry from Markus Skrabal from Germany on how to configure Apache for Railo under JBoss. I also referenced an article on how to deploy Railo 3 to Jboss. There was only one problem with referencing that article.

The directions are on how to install the Railo 3 WAR not on how to install Railo as an EAR. The following is the instructions on how to install Railo 3 to JBoss 4.2.2 as an EAR.

Required Software

Got everything downloaded? Good then lets get going!

Installing Java 1.6

The important bit here is that the JAVA_HOME variable is pointing to your newly installed 1.6 directory. You should already know how to change the environment variables on your machine but if you somehow forgot you can get to it by right-clicking on myComputer>Advanced: Environment Variables (or something similar, I'm currently on a German computer so the words might be a bit different). Once you have opened the environment variable section find the JAVA_HOME and make sure it's pointing to the right directory something like: JAVA_HOME = C:\Program Files\Java\jdk1.6.0_07\jre.

Installing JBoss

The JBoss install is dead easy, just drop the contents of the zip file in a folder and you are done. I extracted it to C:\Jboss_4.2.2

Installing Railo

Go to your JBoss install directory, under the Server folder you will see three additional folders: all, default, minmal. We will be deploying Railo to the default folder. In the default folder is a deploy folder, here we will create a new folder called railo.ear. Rename the railo.war file you downloaded previously into railo.zip and extract the contents of the zip file into the railo.ear folder. Once that is done we need to create a META-INF folder inside the railo.ear folder, then inside the newly created META-INF create a new file called application.xml and paste the following:

<?xml version="1.0? encoding="UTF-8??>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application id="RailoInstance1?>
<display-name>Railo3</display-name>
<description>Railo3</description>
<module id="
Module1?>

<web>
<web-uri>railo.war</web-uri>
<context-root>/railo</context-root>
</web>
</module>
</application>
Save the file and that concludes the install of Railo under JBoss. Go into the JBoss 4.2.2/bin directory and double-click the run.bat file to start JBoss. You should get something similar once JBoss is finished starting up.
11:01:16,203 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
s_4_2_2_GA date=200710221139)] Started in 38s:16ms

Testing the Install

If JBoss started correctly you should be able to go to http://localhost:8080/railo and get the default index.cfm displayed.

Related Blog Entries

6 Comments to "Installing Railo 3 on JBoss 4.2.2"- Add Yours
larry c. lyons's Gravatar Gary,

thanks for the interesting article. One suggestion, rather than using a ear file, unless you have a lot of Java beans, it may be better to use an exploded war file. While I'm not familiar enough with Railo, from what I understand from Gert's talks at CFUnited etc., Railo should work in a similar manner. Steve Brownlee has a very good blog posting on how to do this install with CF8, http://www.fusioncube.net/index.php/coldfusion-on-.... i've found that you can use the exact same approach with the open source version of Blue Dragon, and the commercial Blue Dragon for J2EE as well. Correct me if I'm wrong here but since Railo is just another war file, I imagine it would work in the same matter.
regards,
larry
# Posted By larry c. lyons | 10/14/08 1:35 AM
Jason Dean's Gravatar Gary, Really? That's it? Wow. I might just have to try that.
# Posted By Jason Dean | 10/14/08 8:26 AM
Gary Gilbert's Gravatar @Larry,

I installed Railo on my box using the exploded WAR file, this is just another method should someone prefer an EAR installation. I found the WAR install a lot more straightforward, meaning explode war start JBOSS voila, no creation of extra directories or files.

@Jason,

The WAR install is by far the easiest install on JBoss.
# Posted By Gary Gilbert | 10/15/08 12:45 PM
larry c. lyons's Gravatar @gary,
One problem with the exploded war file is that is you're using clustering, you cannot use an exploded war file due to the auto deployment to other cluster members. However this setup is rarely used in development, mostly its intended for production.

regards,
larry
# Posted By larry c. lyons | 10/15/08 5:57 PM
Jamie Krug's Gravatar I'd just like to clarify a couple minor details, in case this helps others... Gary states "extract the contents of the zip file into the railo.ear folder," which can be a little misleading -- you actually need a directory named "railo.war" to exist beneath "railo.ear" and the contents of the WAR go into ./railo.ear/railo.war. Beneath your deploy/railo.ear/ you should end up with META-INF and railo.war directories, and inside the railo.war directory should be index.cfm and WEB-INF. The first time I followed through this post I ended up with index.cfm and WEB-INF directly beneath railo.ear, which did not work.

Lastly, the URL to test the install is still port 8080, not 8600 -- maybe a typo or maybe Gary has a more custom configuration?

Thanks again!
# Posted By Jamie Krug | 2/25/09 2:55 AM
Gary's Gravatar @Jamie,
This is indeed a custom configuration on how to deploy Railo as an .ear. I must also say that I didn't write it just translated it from German into English.

My Jboss deployment article that I wrote about my own deployment can be found here: http://www.garyrgilbert.com/blog/index.cfm/2008/9/...


Thanks again!
# Posted By Gary | 2/26/09 7:14 PM

Powered By Railo

Subscribe

Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.

Tags

adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.

Blogroll

An Architect's View
CFSilence
Rey Bango
TalkingTree

Wish List

My Amazon.com Wish List