This content has been marked as final. Show 4 replies
> I am using a custom tag CFX_IMAGE. It is a .dll file which needs to be
> registered in the Coldfusion Administrator in order for Coldfusion to find this
> file. I would like to register this tag automatically with code versus having
> to manually register the .dll in the Coldfusion Administrator. Does anyone know
> where this reference is stored and how I would create this reference with code?
I presume it is one of the neo-xxxx files in the lib folder, but I do
not know which one. If you are brave enough, one should be able to edit
this file with code, but the service needs to be restarted after a
change for new data to take effect.
Thanks.....after looking around I see that it gets written to the neo-runtime.xml file
Assuming JAVA object creation hasn't been locked out, here is a scripted method for a cfx install.
The example below is an install of the nslookup.dll located in the same directory as the installation template
<cfset request.runtime = factory.getRuntimeService()>
tagname = "CFX_NSLookup";
if ( structKeyExists(request.runtime.cfxtags, tagname) )
//delete the tag name, so when we add a new one it will trigger store()
//(adding and removing are the only things that triger the store() method.)
StructDelete( request.runtime.cfxtags, tagname);
// CPP for dll
// or JAVA
stCFXs = structNew();
stCFXs[tagname] = StructNew();
stCFXs[tagname].name = tagname;
stCFXs[tagname].type = "CPP";
stCFXs[tagname].description = "Provides NSLookup by TCP/IP, used by application for logging.";
stCFXs[tagname].cache = false;
stCFXs[tagname].procedure = "ProcessTagRequest";
stCFXs[tagname].library = "#expandPath('.')#\nslookup.dll";
// store this tag
request.runtime.cfxtags[tagname] = stCFXs[tagname];
Thank you! This was the information I needed. I tested this with my tag and it was registered successfully in the Coldfusion Administrator by using the script.