Coldfusion 获取CFC的应用范围问题

Coldfusion 获取CFC的应用范围问题,coldfusion,Coldfusion,我正在尝试链接CFC,但出现错误: 这是我在Application.cfc中的配置 <cfset Application.relativePath = "/"> <cfset Application.componentsPath = Replace(Application.relativePath,"/","",'All')> <cfset Application.cfcpath = Application.componentsPath & "com

我正在尝试链接CFC,但出现错误:

这是我在Application.cfc中的配置

<cfset Application.relativePath = "/">
  <cfset Application.componentsPath = Replace(Application.relativePath,"/","",'All')>
  <cfset Application.cfcpath = Application.componentsPath & "com">
  <cfset Application.tools = '#Application.cfcpath#.tools'>
如果我尝试

<cfset result = Application.tools.saveDrivers(form)>
我扔掉了应用程序范围,看起来一切正常,但我不确定这里有什么问题

Application.cfcpath和Application.tools都只是字符串,所以只能用作字符串;鉴于声明中的Application.cfcpath.tools:

<cfset result = Application.cfcpath.tools.saveDrivers(form)>
Application.cfcpath和Application.tools都只是字符串,因此只能用作字符串;鉴于声明中的Application.cfcpath.tools:

<cfset result = Application.cfcpath.tools.saveDrivers(form)>

把同样的东西打出来。打我!正如adam所说,您设置了字符串而不是对象,并且字符串没有saveDrivers方法。我尝试了这个方法,它也起了作用:然后这样做:好的,那么您了解了所有这些是如何工作的,并且您现在已经解决了您的问题?键入了相同的内容。打我!正如adam所说,您设置了字符串而不是对象,并且字符串没有saveDrivers方法。我尝试了这个方法,它也起了作用:然后像这样做:好吧,那么您了解所有这些是如何工作的,您现在已经解决了您的问题了?
The saveDrivers method was not found.
Either there are no methods with the specified method name and argument types or the saveDrivers method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity. 
<cfset result = Application.cfcpath.tools.saveDrivers(form)>
tools = createObject(Application.tools);