Configure virtual directory on Tomcat

In these days, I've removed Adobe Coldfusion9 Developer version from my laptop and tried to install Railo 3.2 for testing about ORM feature of it. That's why I've installed the integrated installer of Railo. Before installation Railo, I feel I should remove existing apache from my laptop because I won't want any conflict will be come out because of Railo. Regarding Railo integrated installer documentation, it used Apache + Tomcat + Railo in it. That's why I feel I'm correct what I did.

After a few minutes, Railo is completely installed in my laptop. After that, I need to migrate my existing projects into Railo by configuration on Tomcat. That's why I need to create virtual directory on Tomcat. Well, I've posted create virtual directory in Apache and I feel create virtual directory on Tomcat will be same as what I've posted about.

Here is simple way to create virtual directory on Tomcat.

  • 1) [tomcat_install]/tomcat/conf/Catalina/localhost/
  • 2) create XML file. File name is the name of the virtual directory's name. If you created XML file name as posCFC.xml, your virtual directory will be "http://localhost/posCFC/"
  • 3) add the following coding into this XML file.
    view plain print about
    1<Context path="/POS" docBase="E:/Project/POS" debug="0" privileged="true">
    2</Context>
  • 4) Restart your Tomcat. (it's optional.)

CFHttp for Adobe Coldfusion and Railo Coldfusion

I got a problem to test web-spider created by Raymond in my blog yesterday. Even I put the right files and the right coding into my blog, I couldn't test and run this file. I don't know why and I don't want to bother to him anymore. That's why I kept troubleshooting for it by myself. Few minutes later, I just found it's because of Railo.

In Adobe Coldfusion, we need to write the following code if we want to get content from the website inside in CFScript.

view plain print about
1<cfscript>
2    function getContent(url)
3        {
4            var h = new com.adobe.coldfusion.http();
5            h.setURL(url);
6            h.setMethod("get");
7            h.setResolveURL(true);
8            variables.queue = [];
9            var result = h.send().getPrefix();
10            var content = result.filecontent;
11            return content;
12        }
13
</cfscript>

In Railo, it's quite different. We need to write the following code if we want to get content from the website inside in CFScript.

view plain print about
1<cfscript>
2    getInfo = new HTTP(url='http://www.ppshein.net');
3
    Results = getInfo.send();
4    myStructure = DeSerializeJSON(Results.getPrefix().filecontent);
5</cfscript>

That's the first one I know different between Railo and Adobe. I think there might have a few different functions and tags between them. I can't convince why Railo don't want to develop the same function structure and calling style like Adobe Coldfusion. I think they're trying to make simple than Adobe Coldfusion.

[More]

Finally I'm on BlogCFC

I've spent 24 hours for migration my official blog from MangoBlog to BlogCFC. I don't want to clarify why I decided to move from MangoBlog to BlogCFC because most of facts have been clarified by Nil at his blog. http://nil.checksite.co.uk

For me, the important reason that I choose BlogCFC because of Mobile version and others are such as tweetbacks and gravatars picture from comment (which I really like this one :)).

MangoBlog has also advantages such as one-click-plugin-installation and themes which are based on Blogger and Wordpress. Please don't get me wrong either.

Database migration? No idea. I configured two databases by myself(manual) because my hosting is based on Railo which doesn't currently support ORM.

[More]

Railo on IIS 7

Recently, I've installed Railo on IIS7. Why I need to install Railo? Because, I'm not rich enough to buy Adobe Coldfusion 9 installer for my personal Development. Even Developer Edition isn't complete enough for me what I want to develop. That's why I decided to install Railo on my pc. I'll guide step by step screen-shot explanation.

1) Download Railo under this website. http://www.getrailo.org/index.cfm/download/

2) Install Railo to C:\Railo\

Railo

Because, they already wrote not to install Railo in a directory containing space.

3) Need to enable 32 bit application on your IIS 7. if your window system type is 64bits, you can skip this step. 

 

4) Need to define Handler Mappings. Server > Sites > Default Website. You will see following screen and Click on Handler Mappings.

After clicking, click on Add Script Mapping which located on the top of the right side. After that, you will see one following Dialog-Box. And fill all needed information as follow.

5) Need to add Extension on ISAPI filters. Server > Sites > Default Website. You will see following screen and Click on ISAPI Filters.

After clicking on ISAPI Filters, you will see Dialog box and fill all needed information as follow.

6) Go to C:\Railo\conf\ and create file name as host.xml. And write following coding in this file.

view plain print about
1<host host-name="www2.welcomedriver.com">
2<host-alias>www2.godriver.com</host-alias>
3<root-directory>C:\_webproduction\welcomedriver - production\htdocs</root-directory>
4<web-app id="welcomedriver" document-directory="." />
5</host>

Configure as above message, you can browse Railo Admin as follow : http://localhost:8600/railo-context/admin/server.cfm 

 

Enjoy it...!!!

Best credit to  : http://groups.google.com/group/railo/browse_thread/thread/949b8156e4006e3c/0f6e1493906da575?lnk=gst&q=railo+on+IIS#0f6e1493906da575

Top of Page