我正在开发一个大量使用自定义标记的Lucee应用程序。
我的结构如下:
调用应用程序文件-C:luceetomcatwebappsweb-portalweb-champsindex.cfm
我正在调用的文件的位置-C:luceetomcatwebappsempportalChampsCFCinvoice.cfc
我在Lucee管理员中定义了一个自定义标签,名称为empportal
,资源为C:luceetomcatwebappsempportal
(也尝试过不使用尾随的(。添加自定义标记后,我重新启动了服务器。
错误消息
无效的组件定义,找不到组件[empportal.Champs.FCFC.invoice]Stacktrace
中发生的错误C: \lucee\tomcat\webapps\web portal\web champs\dps_outstandingInvoices.cfm:line 11: <cfinvoke component="empportal.Champs.CFC.invoice" method="getOutstandingItems" org_ID="#session.orgID#" returnvariable="getOutstandingItems" />
我还尝试使用new empportal.Champs.CFC.invoice()
和相同的问题创建组件。
在Lucee中,您需要将文件放在ROOT
文件夹中,以便tomcat可以加载它们。在我的案例中,将文件夹移动到C:luceetomcatwebappsROOT
而不是C:luceetomcatwebapps
并重新启动解决了问题。