Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


CFC for a dummy?  Help!?!?

Posted on 2006-06-08
Medium Priority
Last Modified: 2013-12-24
I have a cfc in the parent folder of the current path of the page.    It doesn't like it.

        //This works.
      objTools = createObject("component", "Ticket_Search_Tools");

       //Doesn't work
       objAddTools = createObject("component", "../Add_Ticket_Tools");
Question by:Tertioptus
LVL 12

Accepted Solution

mkishline earned 2000 total points
ID: 16864587
In my past experience, I could only get Coldfusion to locate a component if it was either in the same directory or if I had created a mapping and pointed to it that way. Go to your Coldfusion administrator and select the "Mappings" option under "Server Settings". The logical path for you can be something like "/tickettools" and the directory path will the path on your server that points to the parent directory you are trying to access (ie /opt/coldfusionmx7/CustomTags/tickettools/) Your code would then look something like this:

  objAddTools = createObject("component","tickettools.Add_Ticket_Tools");
LVL 18

Expert Comment

ID: 16866063

You cant use relational paths ie ..

What we do is creating a mapping pointint to where your cfc's live call it com for example.

Then use

objAddTools = createObject("component","com.tickettools.Add_Ticket_Tools");


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
What You Need to Know when Searching for a Webhost Provider
Integration Management Part 2
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

576 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question