在Railo中找不到带有映射的CFC

时间:2013-12-17 21:53:12

标签: coldfusion railo cfml application.cfc

我正在努力让映射工作

 ...
 this.mappings = {
    "/toolbox"  = ExpandPath(".") & "toolbox",
    "/models"   = ExpandPath(".") & "controllers/model",
    "/model"    = ExpandPath(".") & "controllers/model"  // hack, plural is correct
    };


setupApplication() {
 ...
// works
application.objCCFRO    = new controllers.model.ccfro();
application.objUtil     = new controllers.model.utils();

// Does not work
application.objCCFRO    = new models.ccfro();
application.objUtil     = new models.utils();
...
}
  

组件定义无效,无法找到models.ccfro   railo.runtime.component.ComponentLoader.load(ComponentLoader.java:276):276   在   railo.runtime.component.ComponentLoader.loadComponent(ComponentLoader.java:39):39   在   railo.runtime.PageContextImpl.loadComponent(PageContextImpl.java:2784):2784   在   railo.runtime.functions.other.CreateObject.doComponent(CreateObject.java:178):178   在   railo.runtime.functions.other._CreateComponent.call(_CreateComponent.java:21):21   在   scorecard38.application_cfc $ cf.udfCall(d:\ railo \的webapps \ WWW \ Scorecard38 \的Application.cfc:55):55   at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:94):94

注意:ACF没有此问题

1 个答案:

答案 0 :(得分:5)

更改映射时必须确保更改应用程序名称。