Mitrahsoft
  • SERVICES
    • OUR SERVICES
      • SOFTWARE DEVELOPMENT
      • MOBILE DEVELOPMENT
      • BLOCKCHAIN DEVELOPMENT
      • SOFTWARE TESTING
      • CLOUD & DEVOPS SERVICES
      • PRODUCT DEVELOPMENT
      • OFFSHORE DEVELOPMENT
      • SOCIAL MEDIA MARKETING
      TECHNOLOGIES
      • COLDFUSION DEVELOPMENT
      • REACTJS DEVELOPMENT
      • VUEJS DEVELOPMENT
      • ANGULAR DEVELOPMENT
      • NODEJS DEVELOPMENT
      • PYTHON DEVELOPMENT
      • GOLANG DEVELOPMENT
      • GOLANG CORPORATE TRAINING
      COLDFUSION EXPERTISE
      • MURACMS EXPERTISE
      • COLDFUSION APP MIGRATION
      • COLDFUSION HOSTING & SUPPORT
      • CF LEGACY APP MAINTENANCE
      • COLDFUSION REST API
      • ECOMMERCE / SHOPPING CART SOLUTIONS
      • PRESIDECMS EXPERTISE
      MOBILE DEVELOPMENT
      • REACT NATIVE DEVELOPMENT
      • FLUTTER DEVELOPMENT
      • IONIC DEVELOPMENT
      • PHONEGAP DEVELOPMENT
  • ABOUT US
    • ABOUT MITRAHSOFT
    • OUR CLIENTS
    • TESTIMONIALS
    • PORTFOLIO
    • CAREERS
  • CONTACT US
  • BLOG
Adobe Solution PartnerLucee Solution Partner
Adobe Solution PartnerLucee Solution Partner
Adobe Solution PartnerLucee Solution Partner
  • OUR SERVICESSOFTWARE DEVELOPMENTMOBILE DEVELOPMENTBLOCKCHAIN DEVELOPMENTSOFTWARE TESTINGCLOUD & DEVOPS SERVICESPRODUCT DEVELOPMENTOFFSHORE DEVELOPMENTSOCIAL MEDIA MARKETING
    TECHNOLOGIESCOLDFUSION DEVELOPMENTREACTJS DEVELOPMENTVUEJS DEVELOPMENTANGULAR DEVELOPMENTNODEJS DEVELOPMENTPYTHON DEVELOPMENTGOLANG DEVELOPMENTGOLANG CORPORATE TRAINING
    COLDFUSION EXPERTISEMURACMS EXPERTISECOLDFUSION APP MIGRATIONCOLDFUSION HOSTING & SUPPORTCF LEGACY APP MAINTENANCECOLDFUSION REST API ECOMMERCE / SHOPPING CART SOLUTIONSPRESIDECMS EXPERTISE
    MOBILE DEVELOPMENTREACT NATIVE DEVELOPMENTFLUTTER DEVELOPMENTIONIC DEVELOPMENTPHONEGAP DEVELOPMENT
  • ABOUT MITRAHSOFTOUR CLIENTSTESTIMONIALSPORTFOLIOCAREERS
  • CONTACT US
  • BLOG

Modify Lucee Administrator Settings Programmatically Using Cfadmin Tag

HomeBlogModify Lucee Administrator Settings Programmatically Using Cfadmin Tag
Lucee

Modify Lucee Administrator Settings Programmatically Using Cfadmin Tag

M
Post by MitrahsoftPublished: May 16, 2019

Most of them facing little bit difficulty while doing project setup. Because, We must to do DB connecting process, Datasource creation, schedule tasks creation process if we put setup for running project and so on. For this, we need to use project based application servers ( CF or Lucee ) user interface. But, Most of them don't like this. They are expecting above mentioned process via code. Ofcourse, CFML has cfschedule tag to create/update/run/delete schedule task files. But, we don't have an any other option to modify application server configurations via code.

Now, Lucee administrator API solved this problem. Lucee administrator API provides lot of opportunity to manipulate the Lucee administrator configurations without using lucee user interface, that can able to acheived by cfadmin tag. This tag is fully integrated with CFML and has lot of attributes to achieve our needs.

Here, We will explain, how to use cfadmin tag and will explain some of the attributes useages.

Required attributes for all operations

NameDescription
actionThe administrative action to perform.
typeThe admin context: web or server
passwordThe admin password.

Create/Update/Remove Datasource

Usually, for creating/updating datasource we need to login with Lucee admin and then go to datasource section. But, cfadmin tag has the facility to create/update/remove datasource without using lucee admin user interface. Using below mentioned attributes we can able to acheieve our process.

We need use same attributes for creating/updating datasources, but the small difference is, if the given datasource name is not available in lucee admin means, it will create new DSN.
Lucee Create Update Datasource

Needed Attributes & their descriptions

NameDescription
dbdriverNeed to mention MySQL or MSSQL database driver name. For example, MSSQL - MSSQL MySQL - MySQL
classNameDefines the name of the database driver class. For example,
MSSQL - com.microsoft.sqlserver.jdbc.SQLServerDriver
MySQL - com.mysql.cj.jdbc.Driver
 
dsnDefines the dsn for a data source
nameDefines the name of a data source definition
hostContains the host of a database server in a data source definition
databaseDatabase name
portSQL server port number
dbusernameSQL server username
dbpasswordSQL server password
remoteClientsEvery tag can contain remote clients to synchronize its settings with. It is a list of labels of in the admin defined remote clients

Sample code for create/update Datasource

cfml
<cfadmin
	action="updateDatasource"
	type="server"
	password="password"
	dbdriver="MSSQL"
	className="com.microsoft.sqlserver.jdbc.SQLServerDriver"
	dsn="jdbc:sqlserver://{host}:{port}"
	name="dsn" <!--- give the existing name to update the dsn or it will be a new name for the dsn --->
	newName="dsn"
	host="localhost"
	database="luceetestdb" <!--- your database name --->
	port="1433"
	dbusername="your DB username"
	dbpassword="your DB password"
	remoteClients="arrayOfClients"
>

Using the above mentioned sample code, we can able to create/update datasource on lucee administrator. Here, I have mentioned DSN name dsn and new DSN name newdsn. So, the code first check dsn name is available or not. If it's available means, just do the update. If it's not available, just create a new datasource.

Sample code for remove datasource

cfml
<cfadmin
 	action="removeDatasource"
 	type="server"
 	password="Your lucee admin password"
 	name="blogdsn"
	remoteClients="arrayOfClients"
>

Sample code for get Datasource info

The cfadmin tag has the facility to list out all mentioned datasource details. Using the below mentioned code we can able to list out all the datasource info.

cfml
<cfadmin
	action="getDatasource"
	type="server"
	password="Your lucee admin password"
	name="dsn"
	returnVariable="existing"
>

Lucee server configuration

Not only create/update/remove datasource. Using cfadmin tag, we can able to manipulate Lucee server configurations also. Such as update lucee admin password, get version details, update versions, get Extension info and install new extension and so on.

Needed Attributes & their descriptions

NameValue
actionvalue - restart
typeValue - web or server
passwordLucee admin password
providerurl of the extension provider

Now, we don't need to restart the lucee server manually. Instead of this, using below code can able to restart the server

Sample code for restart the lucee server

cfml
<cfadmin
 	action="restart"
 	type="server"
 	password="password"
	remoteClients="arrayOfClients"
>

Sample code for update the lucee version

cfml
<cfadmin
 	action="runUpdate"
 	type="server"
	password="Your lucee admin password"
>

Sample code for update the lucee admin password

cfml
<cfadmin
	action="updatePassword"
	type="server"
	oldpassword="password"
	newPassword="passwordf"
>

Lucee server extension configuration

You are all know, The Lucee server don't have all extensions by default. Instead of, they are create new section to install the extension whatever we need for our applications. Actaully, this is good.

So, we can able to install/update the extension using cfadmin tag.

Needed Attributes & their values

NameValues
actiongetExtensions
typeweb or server
passwordLucee admin password

Sample code for get Extensions information

cfml
<cfadmin
 	action="getExtensions"
 	type="server"
	password="Your lucee admin password"
	returnvariable="extensionInfo"
>
<cfdump var="#extensionInfo#" label="getExtension"/>

Sample code for update the Extension

cfml
<cfadmin
 	action="updateExtension"
 	type="server"
 	password="Your lucee admin password"
 	provider="http://extension.lucee.org"
 	id="2BCD080F-4E1E-48F5-BEFE794232A21AF6" <!--- Id for jTDS extension --->
	name="jTDS (MSSQL,Sybase)" <!--- for jTDS (MSSQL,Sybase) --->
>

Tags

ADYENAMAZON-SESANDROIDAPACHEAPACHE-JMETERAWSBARCODE-SCANNERCOLDBOXCOLDFUSIONCOLDFUSION-API-INTEGRATIONCOLDFUSIONBUILDERECHARTSEVENT-GATEWAYFFMPEGFW1JQUERYJSOUPLUCEEMURACMSMURACMS-THEMENODEJSONESIGNALOSSPAYFLOW-PROPAYMENT-GATEWAYPAYPALPRESIDECMSPUPPETEERRAILORAZUNAREACTJSREACTNATIVERESTSASS-COMPILATIONSEMANTIC-UISUBLIMETEXTTINYMCETWILIOYUI-LIBRARY

Archives

JAN 20DEC 19AUG 19JUL 19JUN 19MAY 19APR 19MAR 19FEB 19JAN 19DEC 18NOV 18OCT 18MAR 16NOV 15SEP 15MAY 15MAY 14OCT 13JUN 13MAY 13APR 13MAR 13FEB 13JAN 13

Follow us

Mitrahsoft
United StatesUnited States

Hurst, Texas, United States

+1 (817) 606-8684usa-sales@mitrahsoft.com

IndiaIndia

Head Office

126G2/5, Thiru malai nagaram,
Kovilpatti - 628 501

Madurai

1/B, 2nd & 3rd floor, GV Complex,

Bye Pass Road, SS Colony,

Madurai - 625 016

Coimbatore

2nd Floor, Sri Narmadha Towers,

Murugan Nagar Rd, Thoppampatti Pirivu,

 K. Vadamadurai, Coimbatore - 641 017

+91 9092480924

business@mitrahsoft.com

ColdFusion
  • eCommerce / Shopping Cart Solutions
  • Payment Gateway Integrations
  • Shipping API Integrations
  • ColdFusion Development Services
  • REST API Development
  • MuraCMS Plugin Creation & Personalization
Technology Services
  • ReactJS Development
  • VueJS Development
  • AngularJS Development
  • NodeJS API Development
  • Python Development
  • Golang Development
  • React Native Development
  • D3.JS data Visualization
Other Services
  • Software Development
  • Mobile Development
  • Blockchain Development
  • Cloud & Devops Services

Connect with MitrahSoft

Please fill out this field
Please fill out this field
Please fill out this field
Please fill out this field
Please fill out this field
Please fill out this field

© 2026 All Rights Reserved. MitrahSoft Solutions Pvt Ltd

Home|About Us|Careers