Entries Tagged as 'BlueDragon and Railo'

Apache Tomcat does a 302 redirect to default page

BlueDragon and Railo , WEBBY STUFF No Comments »

I have just migrated a client site from CF to their own dedicated VPS running Railo on Apache Tomcat.

One of the issues that arose as a result is that when visiting their site auctionnews.co.uk an automatic 302 redirect occurred redirecting to auctionnews.co.uk/default.cfm which is the default page for the site.


Now I knew this was not IIS so it had to be Apache Tomcat causing it, after Googling I found numerous other people with this issue but no solution. The only suggestions I found seemed madly over the top, like re-compiling the Tomcat source with new directives to creating a custom servlet.


I then just took a step back and thought there must be a simple solution, and remembered that Tomcat has its own set of default files and wondered if this might have something to do with it. I checked the web.xml and of course default.cfm was not in the list as this is not a common default file, so I surmised that Tomcat must be getting the default filename sent to it from IIS and was thus redirecting to it, so perhaps simply adding default.cfm to the <welcome-file-list> might resolve the issue.

Eureka I was right, adding <welcome-file>default.cfm</welcome-file> to the m<welcome-file-list> resolved the issue and no more redirects.


So to summarise, if your default document is only set on the webserver it gets passed to Tomcat which does a redirect. If the default document is specified in Tomcat's <welcome-file-list> it will simply forward to that document with no redirect.


Considering the lack of Google results on this topic hopefully this simple solution might stop others tearing their hair out Smile

Railo: Dynamic host configuration

BlueDragon and Railo No Comments »

Probably the biggest advantage with ColdFusion is the simple installer and the way it hides all the complexities of JRUN and Java from you and most of the time just works right out of the big. One of the simplicities of which is requiring you to only create a web site on the web server and it just works. With Railo it is more complex as you also need to add a host entry to the servlet container (railo, Tomcat, Jboss etc).

Thankfully with Railo this extra step can be avoided as well with a simple regular expression that effectively generates the host entry on the fly. This does however only work on Resin, so if you are using another servlet container I think you are out of luck, but I'm not expert so don't take my word for it, check the docs or ask on the relevant forums if you can use a regex in the host entry.


The following single host entry is what I am using on cfmldeveloper.com for the free hosting and simply requires that you stick to a standardised directory format for the home directory of all your sites.


This example presume all the sites are located at


d:\wwwoot\[domain name]\wwwroot


You can of course modify it for your own requirements.


The regex also strips the www from the domain name before evaluating it so that this is not used in the path name. Without this it would evaluate www.mydomain.com and mydomain.com as different paths.


   1: <host regexp="(?:www\.)?(.+)">
   3:         <host-name>${host.regexp[1]}</host-name>
   4:         <root-directory>D:/wwwroot/${host.regexp[1]}</root-directory>
   5:         <web-app id="/" root-directory="wwwroot">
   6:                   <!-- enable/disable directory browsing -->
   7:                   <servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"/>
   8:         </web-app>
   9:     </host>

What OS are web developers using?

BlueDragon and Railo , Jibber Jabber , News & Gossip , WEBBY STUFF 5 Comments »

The open source PHP dynamic language is one of the most widely deployed languages on Web servers today. But what operating systems are PHP developers using to develop and deploy their applications? It's a question that has been asked before and now it's being answered with a new study from Zend, one of the lead commercial backers behind PHP.

The study surveyed 2,000 PHP developers in December and found that 85 percent reported that Linux was their primary operating system as a production environment for PHP.

Windows came in at a distant second at 11 percent while Mac OS X came in third at just 2 percent. However, when Zend drilled down into which platforms respondents prefer for their development, the rankings change dramatically.

According to the study, 42 percent of respondents reported that Windows was their primary operating system for development. Linux came in as No. 2 at 38.5 percent while Mac OS X remained in third place at 19.1 percent.


The findings indicate that while Microsoft Windows remains the top platform for developing in PHP, its lead may be narrowing. Back in 2006, a Microsoft executive reported that 85 percent of PHP developers were developing on Windows, but only 20 percent deployed on a Windows machine. The change comes despite joint work by Zend and Microsoft to improve the capabilities of PHP on Windows servers.

that the new study was based on over 2,000 completed surveys conducted in December 2009, some of which came from Zend customers. The survey was made public through the Zend Framework website, the Zend monthly newsletter, Twitter and DevZone.


I have also noticed recently from reading blogs and lists that the majority of CFML open source developers seem to deploy Railo or Open BlueDragon on Linux, which is a major paradigm shift from ColdFusion developers who primary use Windows.


I don't think this is a matter of preference but rather one of necessity as pretty much all the PHP documentation is for Linux, most PHP apps are written for Linux/Apache and are not supported on windows even if you can get them working.


If you have tried to install Railo then will have discovered this can also be quite a task and a challenge to get working, especially on windows/IIS7, and there are far more blog posts and docs explaining how to get it running on Linux, as well as ready made virtual disk images, which I suspects encourages people to take the path of least resistance and install Linux.


In the case of CFML this does however tend to be done using virtualisation software such as virtualbox or vmware to run a linux development servers on windows, so cfml developers do still seem to be using windows as their primary desktop OS, so I do wonder if Zend took this into consideration with their study and if many of those who listed Linux as their primary development OS may in fact be running it as a virtual machine on windows. This feeling is further extrapolated by the fact that developers are mainly using servers distros like CentOS.


You also need to consider all the obvious facts as well:- While Linux has a lot going for it and plenty of software, most of the best/popular software, especially web dev/design products like Dreamweaver and the rest of the Adobe line is not available on Linux. Sure there are alternatives, but they are certainly not in the same league and you can't walk into PC World and buy any of it. For those who have always been running a Linux desktop this will of course not matter at all, but for the rest this will be a big issue, especially if it is software you have spent a lot of money on, so running a virtual machine makes sense.

Of course it could be the other way round entirely and developers are running a windows VM on linux, but this would seem an off way of doing it if their primary tools are on windows.


Before the Linux fanboys start ranting, let me make it 100% clear that this is not a linux vs windows slanging match and I will delete all churlish comments attempting to turn it into one. If you comment keep it on-topic and professional.

Enabling Coldfusion/Railo errors on IIS 7

BlueDragon and Railo , ColdFusion 9 Comments »

I just did a Railo/Tomcat install on an IIS7 server and thought the whole thing was hosed as I could only get a 500 internal server error. As I was using the viviotech installer I even bugged Jordan Michaels ( great name dude :-) ) for some help.

I didn't imagine for a second it could be my test.cfm file as it only said "hello world", man do I feel silly now.


It turns out that everything was working just fine, but IIS7 was actually hiding the errors. Here is what happened.


What I had done on the default website was create a new text file, then rename it to test.cfm. Now by default windows hides known file extensions, so what I really did was rename it to test.cfm.txt but as I couldn't see the .txt I didn't realise.

As a result Railo was throwing file not found errors, IIS was hiding it and giving me a "500 internal server error".


On my 2nd site I had a working test.cfm file, but there was also an application.cfm which was trying to access a non existent DSN, which was also causing an error, which was also hidden.


The setting in IIIS that causes this can be changed as follows. Click images for bigger versions.


Open your IIS management console, select the ROOT to change this for all sites, or the site you want to change, and double click "Error Pages".



Now click on "Edit Feature Settings"



In the following dialog box change it to "detailed errors". The default setting only shows the errors locally on the server.





Thanks to Jordan Michaels for trying to help me resolve a non existent problem with his installer.

Although I did discover a problem with the FusionReactor instll at the same time :-)


Note that this issue effects ColdFusion and Railo or indeed any application server, all errors will be hidden by the IIS 7 default setitng above.

The new face of CFMX Hosting

BlueDragon and Railo , ColdFusion 5 Comments »


For the last 6 years I have been working for Loud-n-clear Ltd, with whom I merged CFMX Hosting back in 2003. After 6 years of feeling like I was banging my head against a brick wall  I decided it was time split the companies up again so that I could actually work on growing and expanding CFMX Hosting, and get out of the rut I had found myself in. So In January I left Loud-n-clear, separating CFMX Hosting and taking it with me and launched a new company called "BlueThunder Internet". This will be the new name of CFMX Hosting, which I am re-branding to be more generic and less CF-centric which I feel will be a positive move in the in this current recession where I don't think one can afford to restrict oneself to such a small niche especially in such a competive market place as hosting. Plus there is the fact that there is no such thing as "CFMX" any longer since Adobe changed the name back to plain "ColdFusion", so I have been thinking of changing the name for a while.




While I am still a huge ColdFusion fan it is no longer the only cfkid on the block, so my new company will be specialising in "CFML" and supporting the likes of Railo and BlueDragon as well as ColdFusion and all the other usual technologies. I have become a big fan of Railo of late especially since it is far better suited to the shared hosting environment than ColdFusion with its per site admin interface which means less support tickets and more control for the customer, plus the security side of things is also significantly better.

If you haven't yet heard about railo or you have heard about it but don't know why you would want to use it, I strongly recommend heading over to CFMeetup and watching the recent recording of the Railo 3.1 Open Source Presentation, this should give you some idea of how cool Railo is and some of awesome and unique new features it provides, or perhaps like me it will even get you as excited as you used to be about ColdFusion :-)

With the emergence of open BlueDragon and railo now also being open source as well, I think this is going to give a much needed boost to CFML as a language and the community at large. Finally CFML is now on equal footings with the likes of PHP as it is now also free to download and use, but with the added advantage of being easier to learn and more powerful, oh and it works better on windows too ;-)


For those who may be wondering where the name "BlueThunder" came from, it was many many hours of trying to find a domain name that wasn't already taken and is easy to remember, which is very hard by the way. I had exhausted just about every name using the word "fusion" or "hosting" so I then randomly just decided to start thinking of names of old 8 bit computer games and old TV shows and then I remembered that old show about the helicopter called Blue Thunder, which as well as liking the name I thought was also a bit of a play on words in the same vein as ColdFusion, it has that same feeling of power, so having found a domain name that was free, I snapped it up. You may also notice the new logo might look slightly reminiscent of the original Allaire ColdFusion logo.

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds