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

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

Profile IconJohn McClain, Michael Steen and Cfdevshop joined ColdFusion Community
Oct 23
Jelle Kralt updated their profile
Sep 19
CVgeek added a discussion to the group CF Contractors
Thumbnail

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
CVgeek added a discussion to the group Coldfusion Jobs
Thumbnail

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
kanth posted a blog post

ColdFusion Application Development by ColdFusion Programmers & Developers

ColdFusion application development is associated with the website development. With the unique features of the ColdFusion development along with the ColdFusion Makrup Language which resembles scripting components like JSP and PHP and even ASP but it bares the most resemblance to HTML syntax. The ColdFusion allows developers to develop content publishing systems, dynamic sites, ecommerce sites, self service application and much more.…See More
Jul 30
Isaac Dealey updated their profile
Jul 29
Thomas Bishop updated their profile
Jul 29
Profile IconBecky B, kanth, Jim Bossemeyer and 15 more joined ColdFusion Community
Jul 29

Members

Translate this page

© 2014   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service