Question

I am trying to migrate from CFMX 6.1 to Railo 3.1.

I have custom tags in this directory for CFMX 6.1

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 directory:

invalid component definition, can't find mycfc

My Railo installation is deployed through GlassFish v3.

I see 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 CFMX 6.1's customtag path.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top