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

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

David Panzarella updated their profile
Saturday
Profile IconDavid Panzarella, Mohit Bhati, José Eduardo Aben Athar da Silva and 6 more joined ColdFusion Community
Saturday
CVgeek added a discussion to the group CF Contractors
Thumbnail

Client facing, Senior ColdFusion developer – 50k (60k max) - Hertfordshire

Client facing, Senior ColdFusion developer – 50k (60k max) - HertfordshireSeeking a candidate that has vision and interested in up and coming technologies and how these maybe applied to the business model in order to maintain leadership in the field. Within a company dedicated to provide systems for public, charity and private sectors.Basically a person with a ‘Can Do’ attitude that will help the management team deliver success.The candidate will also be strong on delivery (client facing skills…See More
May 6
CVgeek posted a photo
May 6
CVgeek shared a profile on Twitter
May 6
CVgeek shared their discussion on Twitter
May 6
CVgeek liked CVgeek's discussion Client facing, Senior ColdFusion developer – 50k (60k max) - Hertfordshire – Job – F/T – on site only
May 6
CVgeek added a discussion to the group Coldfusion Jobs
Thumbnail

Client facing, Senior ColdFusion developer – 50k (60k max) - Hertfordshire – Job – F/T – on site only

Seeking a candidate that has vision and interested in up and coming technologies and how these maybe applied to the business model in order to maintain leadership in the field. Within a company dedicated to provide systems for public, charity and private sectors.Basically a person with a ‘Can Do’ attitude that will help the management team deliver success.The candidate will also be strong on delivery (client facing skills would be a pro) and be used to delivering projects on time and to budget,…See More
May 6

Members

Translate this page

© 2013   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service