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.

After fixing this bug, another one is I've added additional condition statement into Raymond's coding because of there is embedded javascript inside in href tag. I feel he forgot to prevent as follow.

view plain print about
1<!--- unnecessary links --->
2<a href='javascript:toggle_view_8D332A7E4D22B4B7E13484183362C7FB()' style='color:#000000;text-decoration:none;margin:0 1.5em 0 .5em;' id='view_8D332A7E4D22B4B7E13484183362C7FB'>view plain</a>
3
4<a href='javascript:copy_to_clipboard_8D332A7E4D22B4B7E13484183362C7FB()' style='display:none;color:#000000;text-decoration:none;margin:0 1.5em 0 .5em;' id='view_copy_to_clipboard_link_8D332A7E4D22B4B7E13484183362C7FB'>copy to clipboard</a>
5
6<a href='javascript:print_8D332A7E4D22B4B7E13484183362C7FB()' style='color:#000000;text-decoration:none;margin:0 1.5em 0 .5em;'>print</a>
7
8<a href='javascript:show_about_8D332A7E4D22B4B7E13484183362C7FB()' style='color:#000000;text-decoration:none;margin:0 1.5em 0 .5em;'>about</a>

I've added following conditional statement inside into line 26 of this coding.

view plain print about
1!findNoCase("javascript:", realLink)

Anyway, thanks Raymond for writing First draft of a ColdFusion Spider articles. Because I got a lot of idea to develop CF bots.