2

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.

pnuts
  • 58,317
  • 11
  • 87
  • 139
mrt181
  • 5,080
  • 8
  • 66
  • 86
  • Error tells about component initialization, isn't it? But you are talking about custom tags path. Can you please show some code samples where you try to "access a page". – Sergey Galashyn Jan 26 '10 at 19:25
  • We need 3 things to help you figure this out. 1) what is the name of your mapping in the Railo admin? 2) what is the path to the custom tags directory you are trying to access? 3) what is the name of the cfc you are trying to access? – Eric Cobb Jan 26 '10 at 22:08
  • 1. {railo-web}/customtags/ 2. C:\glassfishv3\glassfish\domains\domain1\applications\railo\WEB-INF\railo\customtags\myapp\ 3. mycfc – mrt181 Jan 27 '10 at 21:30

1 Answers1

0

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.

Sergey Galashyn
  • 6,946
  • 2
  • 19
  • 39