ColdFusion Community

The online ColdFusion / CFML community website

What happens if we place the CFCs in different folders other than root folder and how we can invoke them? Is it possible to use them?

Views: 13

Reply to This

Replies to This Discussion

Sure, we can place CFCs in different folder. And while creating the object, specify the folder name.... see the following code below...

objName = CreateObject("component", "Foldername.CFCName");

ex: objCFCothr = CreateObject("component", "Model.CFCName");

In the given example, I am placing the CFC in a folder named 'Model'
The below example is ok if our Model folder is in the web root. if you want to place your CFC in folder other than in root, you have to map the path of the cfc in coldfusion administrator (in mapping section). Give the logical name and the directory path. And while referring the cfc, use that logical name the you gave. If the logical name is 'TestPathCFC' then

objName = CreateObject("component", "TestPathCFC.CFCName");

ex: objCFCothr = CreateObject("component", "TestPathCFC.CFCName");


Latest Activity

Ashutosh Verma liked Raghuram Reddy Gottimukkula's blog post My Experience with Coldfusion Builder
Mar 2
Harmindra Sirohi updated their profile
Feb 18
Harmindra Sirohi posted a status
Feb 18
Isaac Dealey posted a discussion

PayPal Cart Integration

Hey guys,I know I haven't been on here in a little while. I'm hoping one of you will have some information on this...A client of mine asked me to integrate PayPal into their existing custom shopping cart. It's just the typical old PayFlow-style, send the browser to PayPal and then bring them back afterward. I read through all the documentation and I've got it creating the form and sending to PayPal and it all works.Now PayPal says form encryption is not required, although they also say you…See More
Jan 2
Isaac Dealey updated their profile
Jan 1
Profile IconJohn McClain, Michael Steen and Cfdevshop joined ColdFusion Community
Oct 23, 2014
Jelle Kralt updated their profile
Sep 19, 2014
CVgeek added a discussion to the group CF Contractors

ColdFusion Developers (London)

ColdFusion Developers (London)The vacancy is with an established independent B2B industry leading online news, research and events business providing a combination of free –to-air news and subscription based market intelligence databases and services. The company also provides online best practice and professional communities and industry events, large and small.Role:They are looking for an experienced additional ColdFusion developer to join the small in-house team to support continued…See More
Sep 11, 2014


Translate this page

© 2015   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service