31
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Last updated 2/21/2012
Use the Administrator API
1 Instantiate administrator.cfc:
<cfscript>
// Login is always required.
adminObj = createObject("component","cfide.adminapi.administrator");
Note: You can instantiate administrator.cfc and call the login method in a single line of code, as the following
example shows:
createObject("component","cfide.adminapi.administrator").login("admin");
Note: You can log in as a user other than administrator, but with proper permissions, as follows. Provide the user
name after the password.
createObject("component","cfide.adminapi.administrator").login("#password#","#username#")
2 Call the administrator.cfc login method, passing the ColdFusion Administrator password or the RDS password:
adminObj.login("admin");
3 Instantiate the desired CFC:
myObj = createObject("component","cfide.adminapi.debugging");
4 Call the desired CFC method (this example enables debugging):
myObj.setDebugProperty(propertyName="enableDebug", propertyValue="true");
Examples
The following example adds a SQL Server data source:
Comments to this Manuals