Written on 21 March 2011, 03:05pm
Tagged with: coldbox, coldfusion, web server
This post highlights the difference between the ColdFusion Administrator Mappings section and the virtual directories.
The ColdFusion 8 and 9 Admin documentation pretty much explains everything (see highlighted note):
ColdFusion mappings let the cfinclude and cfmodule tags access pages that are outside the Web root. If you specify a path that starts with the mapping’s logical path in these tags, ColdFusion looks for the page using the mapping’s directory path.
ColdFusion also uses mappings to find ColdFusion components (CFCs). The cfinvoke and cfobject tags and CreateObject function look for CFCs in the mapped directories.
Note: These mappings are independent of web server virtual directories. If you would like to create a virtual directory to access a given directory through a URL, please consult your web server documentation.
So, the mappings defined in the CF Admin (
CFAdmin > Server Settings > Mappings) are defined so that ColdFusion is able to access pages outside of your web root. That’s because ColdFusion will not ‘see’ the virtual directories defined in your web server configuration.
Either if you use the JRun server, Apache or other flavors, the ColdFusion will not know anything about their configuration.
Let’s take an actual example: (more…)