Virtual Mapping in ColdFusion 8

I was setting up the ColdFusion 8 server on my new Mac Pro today and am using the development server now in lieu of IIS which I always used on my Windows dev boxes previously. When setting up a virtual directory, I'd always just set it up through IIS. Setting up virtual directories in ColdFusion was a bit of a change for me, and after an hour of head scratching when my CF mapping didn't work when trying to call CFM files through browser, I figured out the following to setup a virtual directory for built-in ColdFusion development server:

1) Open up the jrun-web.xml file located in ColdFusion8/wwwroot/WEB-INF directory.
2) Add a virtual directory mapping as follows:

  <virtual-mapping>
<resource-path>/cf/*</resource-path>
<system-path>/Users/meutznerb/Documents/dev_flex3/CFMiddleTier/</system-path>
</virtual-mapping>

3) Save the file, and restart the CF server instance.

The mapping above will now allow me to call files from

http://localhost:8500/cf/
and reference the CFMiddleTier directory in my Documents/dev_flex3 directory.

The trick was getting the directory path correct... starting from /Documents/... would not work, and required the full path with /Users/meutznerb/Documents/... to be defined.

That's my mac newbie tip for the day :-)

Comments
Comments are not allowed for this entry.
BlogCFC was created by Raymond Camden. This blog is running version 5.005.