Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
kabod #1
cfc location variable
My client site uses CFC extensivly and they are all held above the wwwroot
level to allow webservices to access them. So the directory strucutre looks
something like this
db
extensions(dataobjs / UBR / WS)
logs
wwwroot
I need a way to call the cfcs (under dataobjs/ubr) from within the wwroot
level and I need to put the cfcslocation into a global varibale to use within
the whole site i.e
<cfscript>
tp = CreateObject("java", "coldfusion.runtime.TemplateProxyFactory");
tp = tp.resolvePath("**relative path here**", getPageContext());
</cfscript>
<cfset CFCsLocation = #tp#>
<cfscript>
request.CFCsLocation = "#CFCsLocation#";
</cfscript>
so that I can then call a cfc thus
<cfparam name="Request.cfcs.utils" default="#createObject('component',
'#request.CFCsLocation#.utils')#">
But it doesn't quite work - does anyone else do this kind of thing and how?
Any other ideas?
Cheers
Paul
kabod Guest
-
#39251 [NEW]: variable variable class array property is read only
From: taskfreak at gmail dot com Operating system: mac os PHP version: 5.1.6 PHP Bug Type: Class/Object related Bug... -
Error: That location is controlled by another site.Please choose another location
Hi, I was wondering if anybody came across this error before: "That location is controlled by another site. Please choose another location" I am... -
#22237 [Com]: PHP crashes when class references property using variable variable
ID: 22237 Comment by: rep at devdomain dot com Reported By: peter at globalvision dot com dot au Status: Closed... -
movie location changing when there's nothing changing its location
I have a cross-platform program (each half using a different engine (quicktime for mac and MPEG Advance for pc). On both sides and on most computers... -
Datalist - how (if) to use a sub variable or session variable in the footer?
Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple... -
vkunirs #2
Re: cfc location variable
Hi
I think by adding the path of the CFC's we can use the names of the .CFC directly in the application.
i am using like that only in my application.
vkunirs Guest
-
kabod #3
Re: cfc location variable
How do I get a domain name in it though? Cozz CFCs use dot notation how do you put domain.co.uk in the path?
kabod Guest
-
TA-Selene #4
Re: cfc location variable
Why would you use the domain name in the notation if you are calling the
component from within a CF page? You just need the directory structure if it
is witin your web root and just the component name if its within the Custom
Tags directory.
TA-Selene Guest
-
kabod #5
Re: cfc location variable
but the cfcs are in the same level as wwwroot not under wwwroot
kabod Guest
-
TA-Selene #6
Re: cfc location variable
In order to get CF to find the component, you'll need to create a ColdFusion
mapping to the directory in which the components are stored. The only
directory outside of the web root that CF can find without a mapping is the
Custom Tags directory.
TA-Selene Guest



Reply With Quote

