Deploying Railo as an EAR under JBoss 5

If you've done it with CF, all you need to do is copy a couple of files and make a couple of edits, but basically it goes like this:

Download the railo.war archive.

Create a sub-directory under the jboss server's deploy directory called railo.ear.

In the railo.ear directory, create a sub-directory called META-INF

Create a file called application.xml within the META-INF directory. Here is an example application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">

<display-name>Railo3</display-name>
<module id="WebModule_1">
<web>
<web-uri>railo.war</web-uri>
<context-root>/railo</context-root>
</web>
</module>
</application>

Move the railo.war file to the railo.ear directory, and rename it to railo.war.zip, and unzip it there.

You should now have a sub-directory called railo.war in the railo.ear directory.

Delete railo.war.zip.

Fix the nested zip errors [link to fix] by adding a file in WEB-INF/jboss-classloading.xml that contains:

<?xml version="1.0" encoding="UTF-8"?>
<classloading xmlns="urn:jboss:classloading:1.0"
  name="mywar.war"
  domain="DefaultDomain"
  export-all="NON_EMPTY"
  import-all="true">

</classloading>
Start up jboss, browser to your /railo context (If you've got a default jboss install, it will be: http://localhost:8080/railo), and bada-bing, you should be singing right along.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
AJ Mercer's Gravatar Hi,

I have followed these instruction for my JBoss 4.2 installation - will it work for this version?
Is Railo 3 working fine on JBoss 5?

I am not sure about the last step - browse to your /railo context
Is that still on the JBoss port (8080)?
Can you please post the full URL?

Thank you.
# Posted By AJ Mercer | 9/9/08 3:22 AM
shen's Gravatar By default, the URL would be http://localhost:8080/railo.

Seems to be working fine with JBoss AS 5 RC, for me!
# Posted By shen | 9/26/08 3:10 PM
Ray's Gravatar Hi,
very helpful... thx a lot!!! It works also with JBoss 5.0.1.GA and railo-3.1.1.
But do you know, why it´s not working the "normal" way? Just deploying the war-file and delete some jars...?
Ray
# Posted By Ray | 9/3/09 4:07 AM
coldshen's Gravatar I've updated the instructions for the "normal" way, which is much cleaner, using the jboss-specific jboss-classloading.xml file.
# Posted By coldshen | 9/12/09 11:20 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.3.000. Contact Blog Owner