I have legacy website that was running on ColdFusion, I am shifting it lucee and facing the issue like most of the includes using CFC files and in CF admin, we were adding allowed extension as cfc also. But in Lucee, I didn’t find any settings or not even found this thing in server xml file.
Can you please let me know is it available in Lucee or no?
you can include a demo.html with some cfml in it and lucee will execute it
the server config only has to do with which initial request urls are going to be handled by Lucee, cfinclude will just include whatever file you specify
I just tried doing this with a cfc, bit odd how it works, if you dump out the variables scope after including it, you’ll see the functions from the cfc in the variables scope?
include.cfm
<cfscript>
include "include.html";
include "include.cfc";
dump(variables);
init();
</cfscript>
include.cfc
component {
function init(){
echo("I'm in a cfc!" & getCurrentTemplatePath())
}
}
Thanks for the reply, In CFC file actually they have the html and also some cfm logic as well but not functions.
What I understand from your reply, you are saying call init() function if I got right. but I have cfoutput inside cfc file and it’s in some files are html and in some are cfm basic logic not functions.
Sorry Zac for late,
I created a test folder with test cfc as it was in live server. from included CFC, the legacy application is printing html and text but it says invalid syntax on , even if I remove tag and there is plan html, it’s still showing incorrect syntax.
on server we are using 6.2.1.122 but and I was not able to provide the code from server so i recreated on my local.
it’s a plain html but it also have other logic on server like cfif etc., and as the application is wide and have many files with cfc that actually needs to be cfm but we cannot update there.
As CF Server provide functionality to process cfc file, do you guys have any setting?