Daemonite: Calling CFCs using the TemplateProxy Archive

Daemonite: Calling CFCs using the TemplateProxy Archive


Thursday, April 17, 2003
Calling CFCs using the TemplateProxy

Reading through some old threads I had tucked away from CFCDev, I came across this interesting insight from Matt Liotta, that allows you to invoke CFCs using the TemplateProxy object. In english this means you can create a CFC instance using either a relative or absolute file path.

This will create an object using an absolute path to a CFC:

This will create an object using a relative path to a CFC (and should work with custom tag mappings):

I find it all interesting from the perspective of how CFMX does its thing. But I guess it would be a very useful trick if you found yourself on a restricted server where you couldn't reach the components you were after.

Posted by modius at 10:05 PM | Permalink
Trackback: http://blog.daemon.com.au/cgi-bin/dmblog/mt-tb.cgi/105

Comments

As a matter of curiosity, I tried to run this on CF MX 6.1. Doesn't work. Is it that this doesn't run on CF MX 6.1?

Posted by: Indy on August 19, 2003 09:16 AM

As a matter of curiosity, I tried to run this on CF MX 6.1. Doesn't work. Is it that this doesn't run on CF MX 6.1?

Posted by: Indy on August 19, 2003 09:16 AM

Like many hacks, there's no guarantee that they will survive version changes. This may well have been considered a security bug... I just don't know, sorry.

Posted by: Geoff Bowers on August 19, 2003 10:31 AM