Today on the Railo mailing list someone asked if there was a way to start railo from any directory and use that directory as the web root. A fair enough question and it got me intrigued.
So after a bit of research I come up with the following, of course this works for OS X, change the relevant bits to suit your OS (hey, send me how to do it and I shall update the post)
First off, I downloaded Railo Express (3.3.4.003) and saved it to:
Then I copied the
./start and renamed it to
I added the path to
~/.bash_profile by adding:
so now, to change the
railo_runner script. Mine looks like this:
cd $(dirname $0)
java -DSTOP.PORT=8887 -DSTOP.KEY=railo -jar -Xms256M -Xmx512M lib/start.jar -Drespath=$CURRPATH
The only thing I added was the current path and added it as a System property with the -D flag, as you can see by the
-Drespath=$CURRPATH. All is good so far, now to tell Jetty to do something with it!
/Applications/railo_runner/contexts/railo.xml I changed the system property that is used for the resourceRoot:
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
Now I can do the following:
Earth:~ markdrew$ cd ~/Sites/
Earth:Sites markdrew$ mkdir demo_site1
Earth:Sites markdrew$ cd demo_site1
Earth:demo_site1 markdrew$ railo_runner
And voila! It creates the WEB-INF and you are good to go by http://localhost:8888!
comments powered by Disqus