Mappings per application
In ColdFusion, since version 8 there is a setting in Admin that allows the Application.cfc
file to set custom application mappings. These are not the global mappings that existed previously. It is a great feature. Previously, these were needed to be set from the ColdFusion Administrator. Now we can set these ourselves from the application itself. Here are the instructions on how to enable them:
Check the Enable Per App Settings option on the Settings page of the ColdFusion Administrator. (Or ask the hosting provider, or web administrator for the site to do so.)
Include code similar to either of the following in your
Application.cfc
file:<cfset this.mappings["/myPDFs"] = "c:\inetpub\myPDFs\"> <cfset structInsert( this.mappings, "/myPDFs","c:\inetpub\myPDFs\")>
If you are using the
structInsert
approach, make sure that you first create the structure.