views:

153

answers:

1

Hello, i am trying to migrate from cfmx61 to railo 3.1.

I have customtags in this directory for cfmx61

C:\cfusionmx\customtags\myapp

i copied the directory to

{railo-web}/customtags/

and added this mapping through the railo administrator and also enabled the "Search subdirectories" setting.

I get this error the moment i try to access a page that calls anything from this directroy:

invalid component definition, can't find mycfc

My railo installation is deployed through glassfishv3.

EDIT: I get the error the moment this script is loaded:

<cfscript>
    mycfcinstance = createobject("component","mycfc");
</cfscript>

In the legacy app that i try to migrate, a lot of CFCs have been stored in cfmx61's customtag path.

A: 

First of all, Railo simply does not support search for CFC's inside the Custom Tag directory. Seems that it will, one day.

Second, it looks like small misunderstanding the meaning of the Railo CFC-based custom tags, which you can manage using that "Archives & Resources > Custom Tags" page in Admin. You can find more about it in Railo's blog, for example in these posts: part one and two.

As for the Railo workaround for this legacy app, I couldn't find the way to imitate desired behaviour.

It can be inappropriate, but maybe you will end with batch-replacing

createobject("component","components.

with

createobject("component","

and creating mapping in the Application.cfc or Admin.

So, if you want to put cfc somewhere in the application root.

this.mappings["/components"] = getDirectoryFromPath(getCurrentTemplatePath()) & "components";

Yes, it's not really matches your problem, just an example.

Sergii