Location of file I’m calling - C:\lucee\tomcat\webapps\empportal\Champs\CFC\invoice.cfc
I’ve defined a custom tag in the Lucee admin with a name of empportal and resource of C:\lucee\tomcat\webapps\empportal\ (also tried without a trailing \). I restarted the server after adding the custom tag.
I think there is a location structure issue. I’m missing Tomcat’s default ROOT folder there. Did you place or define a context for Tomcat somewhere? I’d say with your app and Tomcats defaults, Tomcat might not deploy your app correctly. Could you try the following as test? Let’s go step by step:
Move your webroot files to
C:\lucee\tomcat\webapps\ROOT\
That means, your index.cfm should be located at C:\lucee\tomcat\webapps\ROOT\index.cfm
Then move also your empportal files also to the ROOT, like so:
C:\lucee\tomcat\webapps\ROOT\empportal\ That means that your component invoice.cfc will be in
the ROOT, like so:
C:\lucee\tomcat\webapps\ROOT\empportal\Champs\CFC\invoice.cfc
Restart Tomcat and let us know what the responses are. Then we can go further.
I am running into another issue around custom tags.
I’m trying to access a CFC calling from C:\lucee\tomcat\webapps\ROOT\champs\GroundTransport\groundForm.cfm
In groundForm.cfm I’m trying to call <cfset select = new TravelPrefs.select()>
The CFC is located at C:\lucee\tomcat\webapps\ROOT\champs\TravelPrefs\select.cfc
The error I’m getting is
invalid component definition, can't find component [TravelPrefs.select]`
Stacktrace The Error Occurred in
C:\lucee\tomcat\webapps\ROOT\champs\GroundTransport\groundForm.cfm: line 1
I’ve defined a custom tag of TravelPrefs with a directory of C:\lucee\tomcat\webapps\ROOT\champs\TravelPrefs
I also tried adding a custom tag of champs with the parent directory and calling as champs.TravelPrefs.select() and also tried as ../TravelPrefs.select() but same issue with everything I tried.
What I don’t understand right is, you are talking about adding custom_tags. Custom tags are certain cfm files that serve custom cfml tags. For example you would call a custom tag created with a myfooter.cfm file with <cf_myfooter attr1="somevalue"... But somehow you are telling you are defining foldernames as custom tags. I’m some how confused. Sorry for questioning… Is it possible that you mean components (files that have .cfc ) extensions that are called with <cfobject> <cfinvoke> createObject() or new() and not cfml custom tags? I’ve only seen components in your references. For clarification look at http://www.learncfinaweek.com/course/index/section/Code_Reuse/item/Custom_Tags/
I am using components, in the ACF admin everything was defined under Custom Tags and I did not realize there’s a separate place to define components in the Lucee admin. That was a massive oversight on my part. Defining my path the same way under components has resolved the issue.