Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

cfinvoke path

Posted on 2004-04-26
7
Medium Priority
?
816 Views
Last Modified: 2013-12-24
do i need to use a different path than below if the cfm and cfc are not in the same folder?

<cfif isDefined("url.addProdID")>
<cfinvoke component="cartservice" method="newCart" >
</cfinvoke>
</cfif>


should i do this if the cfc is in a folder


<cfif isDefined("url.addProdID")>
<cfinvoke component="api/cartservice" method="newCart" >
</cfinvoke>
</cfif>
0
Comment
Question by:finnstone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 800 total points
ID: 10924422
you can use the dot notation and you can use mappings, example:

/mapping/directory/cartservice
mapping.directory.cartservice
0
 

Author Comment

by:finnstone
ID: 10924460
what is mapping in your example.

what shuld i do if my cfm is in wwroot/show

and my cfc is in wwroot/show/api
0
 
LVL 18

Accepted Solution

by:
Plucka earned 1200 total points
ID: 10924479
Hi finnstone,

You need to setup a mapping in CF administrator.

This mapping points to a directory containing your componenets, then you reference them with . (dot) notation.

MappingName.DirectoryName.Component Name

So if you have this structure.

C:\Com\test
C:\Com\live

and you have components in both test and live. You would setup a mapping say called com to C:\Com\

And then call the component using com.test.ComponentName

Regards
Plucka
0
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 18

Expert Comment

by:Plucka
ID: 10924489
finnstone,

> what shuld i do if my cfm is in wwroot/show
> and my cfc is in wwroot/show/api

I'd setup a mapping in cf administrator called api pointing to wwroot/show/api.

Then in code

<cfinvoke component="api.cartservice" method="newCart" >

Regards
Plucka
0
 

Author Comment

by:finnstone
ID: 10924499
oh..if i dont want to use a mapping, can i just use a absolute URL
0
 
LVL 18

Expert Comment

by:Plucka
ID: 10924511
No, you must use a mapping unless it's in the current directory.
0
 

Author Comment

by:finnstone
ID: 10924550
ok thx
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

715 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