ColdFusion – get admin mappings
Written on 19 December 2011, 03:43pm
Tagged with: coldfusion
Here is a very useful recipe from the Adobe Cookbooks: how to retrieve the mappings from the admin area.
It’s really simple, it involves using the coldfusion.server.ServiceFactory java class, but I am posting it here because I am sure that I will come back to this post at some point in the future 🙂
<cffunction name="getMappings" access="public" returntype="struct" output="false"> <cfset var mappings = StructNew()> <cfset ServiceFactory = createObject("java","coldfusion.server.ServiceFactory")> <cfset mappings = ServiceFactory.runtimeService.getMappings()> <cfreturn mappings> </cffunction>
This is useful when you don’t have access to the CF Admin interface.
Update, 02 March 2015: In case you have access to ColdFusion configuration files, the mappings can be found in plain text in the file
Written by Dorin Moise (Published articles: 243)