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");

RSS


Latest Activity

Alex Kaniaru joined Mark Drew's group
Thumbnail

CFEclipse Users

For people that love using the IDE that is Eclipse with the awesome plugin of CFEclipse
Apr 22
Alex Kaniaru liked Russ Johnson's group ColdBox
Apr 22
Alex Kaniaru joined Russ Johnson's group
Thumbnail

ColdBox

Community group for the ColdBox framework.
Apr 22
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
"Hello"
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

Members

Translate this page

© 2015   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service