Instantiating a CFC in a directory with a period (.) in the directory name

The question is: how do you instantiate a ColdFusion Component (CFC) that exists in a directory which has a period (.) in the directory name.

The CFC I wanted to invoke lived at c:\webroot\components\2.1\math.cfc.

Instantiating it with the full package path “components.2.1.math“, threw an error.

I tried using “/” as well as square brackets in the package path, but both threw ColdFusion errors.

The answer was to create a ColdFusion Mapping (through the ColdFusion Administrator) to the folder in which the CFC lived.

So I created a mapping called “/version_2_1/” and pointed it to “c:\webroot\components\2.1\“. This way the full package page of the CFC was “version_2_1.math“. And this is a seen as a valid path by ColdFusion.

So life is sweet for now.

However, I’m still not sure what would one do if one didn’t have access to CF Administrator.

Do let me know if you know of any other way.

Comment on this blog post...