Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cfinvoke path

Posted on 2004-04-26
7
Medium Priority
?
828 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
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

886 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