rss
twitter

Installing 'Railo Server with Tomcat' on OSX

As one of the first steps in preparing for new development on BlogCFC, yesterday, I wanted to download and install Railo so the new code can be tested on Railo as we move along.

First, let me say, it has been a while since I worked with Railo and the new installers are amazingly simple. It took only a few minutes to download and install Railo and fire up the Server Admin.

Unfortunately, what I wanted to do next was not as easy...actually...it was easy to accomplish, not so easy to find the information I needed, though. I wanted to create a new 'web context' that pointed to the directory where the new BlogCFC code would reside. I had used the 'Railo Server with Tomcat 7' installer found here and seen in the image below.

The problem I ran into was most of the information I could find about creating a new 'web context' was written for other installation types - most notably, when using Jetty as the servlet.

Thanx to the extremely patient Charlie Griefer, who pointed me to a blog post from Todd Rafferty, I was able to find enough information for me to be able to piece together what I needed to do. I am posting this mainly for my own future reference.

DISCLAIMER: This is the process I used to get this working. I am new to Tomcat. I am not certain if this is a 'best practice' - and if its not please let me know a better way. Use this at your own risk.

Let's start from the beginning, go to the Railo download page and grab the files 'Railo Server with Tomcat 7' - go ahead...I'll wait. Please note that I am demonstrating how I did this on OS X, on Windows, your mileage may vary

Go ahead an run the installer - it really is pretty easy. When you are done, in the directory you chose to install Railo, you should see a directory structure similar to the image below.

Now that Railo is installed, I needed to do some prep work. Next I added an entry to my HOSTS file for the BlogCFC code.

view plain print about
1127.0.0.1 railo.blogcfc6.dev
You will need to use an appropriate domain name for your project.

Next, open up the server.xml file located in the {railo}/tomcat/conf directory - where '{railo}' is the path to the Railo install directory. Look for the section where the <Host> blocks are located and add a new <Host> block like such:

view plain print about
1<Host name="railo.blogcfc6.dev" appBase="/Web Stuff/Sites" >
2 <Context path="" docBase="/WebStuff/Sites/BlogCFC6" />
3</Host>

Note:

  • The 'name' attribute is the same as the 'domain' name that is specified in the HOSTS file entry we created
  • The 'appBase' attribute is the parent directory of your project directory.
    I am honestly not sure if this attribute is needed since we are not 'exploding' a .WAR file, but it did not break anything. Can someone from Railo maybe chime in and let us know?
  • In the <Context /> block, the 'docBase' is the web root of the application.

Next, we need to copy some files to the project web root. Navigate to the {railo}/tomcat/webapps/ROOT directory and copy the WEB-INF directory. Then, paste the WEB-INF directory into the directory you set as the 'docBase' in the <Context /> block above.

Finally, restart Tomcat. On OS X this can be accomplished by running the shutdown.sh and startup.sh files, respectively. These files are located, by default, in the {railo}/tomcat/bin directory. Once Tomcat has restarted you can navigate to http://{host name}:{port number}, where {host name} is the domain name you specified in the HOSTS file and {port number} is the port on which Tomcat is listening - if you used the default value in the installer, this will be 80.

DISCLAIMER (again): This is the process I used to get this working. I am new to Tomcat. I am not certain if this is a 'best practice' - and if its not please let me know a better way. Use this at your own risk.

UPDATE: I heard form Mark Drew and Todd Rafferty, both from the Railo team, and the <Host> entry code was updated to reflect the changes they suggested. Mark also noted that copying WEB-INF is not necessary - when Tomcat is restarted, it will be created automatically. Thanx Mark & Todd!

BlogCFC is mine...all mine!!!

As was announced on this week's CFHour podcast, and on Ray Camden's blog, I will be taking the reigns of BlogCFC, and, with the help of some very smart people, will be the driving force behind the next version.

I will admit, we have some pretty big shoes to fill, but I think the ideas we have for BlogCFC 6 will be up to the task.

We have a long list of things we need to take care of to make sure that the current version of BlogCFC will continue to be accessible while we work on the new version. Keep an eye out here, and on the BlogCFC news page for information as it becomes available.

One of the first things we would like to do is gather a core group of people who would like to help start the process of laying out a plan for going forward, including new features, new architecture, etc. for the next version, if you are interested, please leave a comment below, or use the 'Contact' page here.

I would like to note that now that I am the benevolent dictator of BlogCFC, Step 5 of my plan for world domination has been completed. Unlike those silly Hollywood evil ganiuses, I will not reveal my entire plan for world domination, so, don't bother asking.