In my previous post on a Railo-powered CFML engine on Aptana Cloud, I mentioned how easy it was to get Railo installed and working. Well, it was. However, I hit a snag today that I'm still working through.

Here's the basic scenario:
I installed the ColdBox application template because I'm going to be using ColdBox to build this site as I've been wanting to learn to use this CFML framework. The application template opens up without any problems.

From there I decided to install Mango Blog. I had a few problems with this that dealt with MySQL, Railo and preserving single quotes. It was an easy fix and, once taken care of, everything worked fairly well, except...I could only see the homepage of the blog.

If I tried to select a blog entry, I received a 404 error from Apache Tomcat. I switched over to the regular site homepage and tried to access it via the following URL:
http://www.imageaid.net/index.cfm/general/index

This URL tells the ColdBox framework the exact same thing as the URL,  http://www.imageaid.net. The resulting web pages should mirror one another -- save for a missing image, this is the case on my development machine, which also runs Railo. On my Cloud service, I get an Apache Tomcat 404 error. Just as I did with the blog.

Based on a discussion I'm having in the Aptana Forum and some Googling I've done, it's related to Tomcat's configuration and how it uses, or rather does not use, SES URLs. Once I get a definitive solution/explanation, I'll post again.

UPDATE: It is, in fact, an issue with Tomcat's handling of 'SES' URLs. The workaround is not simple, per se. It requires (at this point in my knowledge, anyway) the use of a URL rewriter module for Java (incl. Tomcat). After some significant searching and help from Stephen over at the Aptana Forums, we found a UrlRewiter module/utility that is doing the trick.

The down side to this solution/workaround is that you have to manually configure all the rewrite rules. I'll post again tomorrow with a more detailed solution/workaround for this.

Comments