Surprised I couldn’t find an answer to this, but apparently my searching skills have failed me today.
I’m doing a legacy->coldbox migration and both apps are going to live side by side for a while, and in the legacy app, there are a bunch of folders and files already in the web root.
For that reason (and some others), I want to have my handlers, plugins, views etc to be off the webroot, and managed by ColdFusion mappings.
My Config Coldbox.cfc was easy, so no issues there.
I made the (blatant?) assumption I could add a mapping of “handlers” and CB would go looking for “/handlers” and all would be well and good. However, it doesn’t look like that is the case, as it always looked in my web root.
So - stupid question of the day - how can I set up CB to look at a mapping for my handlers, views, etc?
I’m happy to have my mapping in any way, shape of form, but I’d really like these conventions to be looking under my mappings, rather than my web root.
I can’t seem to see an answer in the documentation, so any help would be appreciated.
I now have:
var root = “…/mapped/app/”;
conventions = {
handlersLocation = “#root#handlers”
,pluginsLocation = “#root#plugins”
,viewsLocation = “#root#views”
,layoutsLocation = “#root#layouts”
,modelsLocation = “#root#model”
,modulesLocation = “#root#modules”
};
What happens when I hit a request is:
Error Messages: The …mapped.app.handlers.General name is not a valid component or interface name.
Component and interface names cannot be empty and cannot start or end with a period.
If i do that, I still have to have empty directories in my web root - no? I’d really prefer not to do that, it’s just going to make things messier than they already are.