what do I have to change to share coldbox on localhost?

I currently have my app running this way under coldFusion8 :

webroot is ColdFusion8/wwwroot

/coldbox/myapp/ <-- my app runs fine here under the cb dir.

what do I have to change to make an app work this way:


theres some config I'm missing. this keeps saying it can't find
modelMapping. coldbox version 2.6.4

Thank you.

You modelMappings.cfm should live within your config directory for each app so



The best solution is to create the directory structure that you need, then you will remove the mapping if you have changed it from the default of “/”.

Once you have done that then you can do something like this inside of your application.cfc.

In my example, I do very similar to what you do. Where all my apps share the same ColdBox instance, but have their own config.cfc in their respective web roots.

this.mappings[’/ColdBox’] = getDirectoryFromPath(getCurrentTemplatePath()) & ‘…\ColdBox’;

You may need to change the above code depending on where the ColdBox directory is relative to your web application, Or you could change this to be an absolute path to the ColdBox directory.

This is also based on the fact that this requires you to also use the non inheritance version of the Application.cfc and if you are going to use the inherited version, you will need to have already defined the mapping inside of the CF IDE anyway. But it is not too hard to modify the Application over to non inheritance mode, and I would highly recommend that you do this.

Feel free to ask any questions.

Thank you Andrew. This is very helpful. Its the details I couldnt
figure out. I will reconfigure this evening and give it a try.