Solved

cfinvoke path

Posted on 2004-04-26
7
803 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 200 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 300 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
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

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

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

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…
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, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

636 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