CFC for a dummy?  Help!?!?

Posted on 2006-06-08
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

    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


    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

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    A web service ( is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
    One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now