User Guide Cancel

Deploy ColdFusion applications

Note:

As of ColdFusion (2021 release), CORBA has been removed. You can no longer use CORBA-related features, functions, and tags.

Adobe ColdFusion includes archive and deployment options that let you package applications and create archive files.

Archive and deployment options

ColdFusion includes the following archive and deployment options.

  • ColdFusion archive files You can package your ColdFusion application's pages, data sources, and settings in a ColdFusion Archive (CAR) file. For more information, see Packaging applications in CAR files.
  • JEE archives You can package your ColdFusion application as an Enterprise Application Archive (EAR) or Web Application Archive (WAR) file for easy deployment to a JEE application server. For more information, see Packaging applications in JEE archive files.
  • Cfcompile  utility The  cfcompile  utility lets you precompile the ColdFusion pages of your application, into Java class files. In addition, you can compile ColdFusion pages to bytecode and save this bytecode in files with the CFM, CFC, or CFR extension. For more information, see Using the  cfcompile  utility.

Packaging applications in CAR files

CAR files let you archive and deploy website configuration information, files, and applications. Use this feature to deploy your website applications to another location or to back up your files quickly and easily. You can manage CAR files using the Packaging & Deployment > ColdFusion Archives area of the ColdFusion Administrator.

Note: CAR file archiving and deployment is different from JEE archiving and packaging through EAR and WAR files.

Perform the following steps when you archive and deploy site information:

  1. Create the archive definition. Identify the type of information to archive about a site. You can archive almost anything about the site, including directories, files, CFX tags, ColdFusion mappings, Solr collections, automated tasks, and server settings. Each archive definition that you create is assigned a name. You use this name each time you build or deploy its content.
  2. Build the archive. Select the name of the archive definition and specify a location to which you store the CAR file.

Deploy the archive .Specify the location of the CAR file and the location to which you restore the contents.

Note: ColdFusion_ does not deploy Administrator and RDS passwords, nor does it unpack archives created in earlier versions of ColdFusion._

For more information on creating, building, and deploying CAR files, see ColdFusion Administrator online Help.

Note:

While packaging your datasource setting in a CAR file keep the following in your mind, if there are data sources with the following drivers:

  • MS Access,
  • MS Access with Unicode, and
  • Derby

or any other data sources referring to a directory path, CAR deployment does not show directory translation for these.

To fix this, do the following:

Go to Administrator and edit the data sources or use AdminAPI to edit those data sources. 

OR

Back up the CAR file, un-archive it and then open file server_setting.xml. 

In server_setting.xml, change the directory path for the required data sources.

Settings that are not migrated after applying Update 2 to ColdFusion (2016 release)

After you apply Hotfix 2 to ColdFusion (2016 release), some settings are not migrated.

You can view the list in the Archive Summary page (under the section Settings Never Migrated) while creating CAR as well as during deploying the CAR.

They are:

  1. Data and Services > Data Sources > Default data sources.
  2. Debugging and Logging > Debug Output Settings > Connector Port
  3. Extensions > CORBA Connectors > Registered CORBA Connectors
  4. Security > RDS > Enable RDS Service
  5. Security > Sandbox Security > Enable ColdFusion Sandbox Security
  6. Security > Secure Profile > Enable Secure Profile
  7. Server Settings > Settings > Default ScriptSrc Directory
  8. Server Settings > Font Management > User-defined fonts
  9. Server Settings > Mappings > Active ColdFusion Mappings > /CFIDE
  10. Server Settings > Mail > Password
  11. Server Settings > Mail > KeyStorePassword
  12. Server Settings > Mail > KeyPassword

Packaging applications in JEE archive files

When running ColdFusion in the JEE configuration, you deploy the ColdFusion application, in enterprise application archive (EAR) or web application archive (WAR) format, on a JEE application server. You then create your ColdFusion application, configuring resources (such as data sources), and storing CFM, CFC, and CFR files in the web application root or in the web server root. In earlier ColdFusion versions, your JEE administrator had to redo each of these steps when deploying your ColdFusion application onto a production JEE server.

The ColdFusion Administrator lets you create an EAR or WAR file that contains the entire application. This archive file contains the ColdFusion web application, settings for ColdFusion (such as data source definitions), and the CFM, CFC, and CFR files that your application uses.

Application packaging

The JEE Archive feature lets you quickly create an archive file that a JEE administrator can use to deploy your ColdFusion application.

Add a new archive definition and create an archive file

  1. Open the ColdFusion Administrator.
  2. Specify a unique name for the archive file (no extension) in the Archive Name field.
  3. Click Add. The Add New Archive screen appears.
  4. Specify archive settings on the Add New Archive screen.
  5. Click Create. ColdFusion creates an EAR or WAR file in the specified application distribution directory.
    The following table describes the settings you make when creating or modifying an archive:

Setting

Description

Archive Type

Select EAR or WAR.

Context Root (EAR only)

Each JEE web application running in a server is rooted at a unique base URL, called a context root (or context path). The JEE application server uses the initial portion of the URL (that is, the portion immediately following http://hostname) to determine which web application services an incoming request. For example, if you are running ColdFusion with a context root of  cfmx , you display the Administrator using the URL

http://_hostname_/cfmx/CFIDE/administrator/index.cfm

Most JEE application servers allow one application in each server instance to use a forward slash   for the context root. The Remote Development Services (RDS) web application is not required if you use a context root of /.

Serial Number

Specifies a ColdFusion Enterprise Edition serial number. If you do not specify a valid ColdFusion Enterprise Edition serial number when creating the archive file, it is deployed as an Enterprise Edition evaluation version, which reverts to the Developer Edition after 30 days.

COM Support

If your application doesn't use COM support, you can reduce the size of the archive file by omitting the supporting files.

Debugging

If the current ColdFusion server is running with debugging enabled, you can disable debugging in the application contained in the archive file.

Include CFML Source

You can optionally deploy Java bytecode instead of CFML source code. For more information, see Sourceless distribution.

ColdFusion Administrator

If your application does not require modification by using the ColdFusion Administrator, you can reduce archive size and reduce security issues by omitting the Administrator files.

Data sources

The data source definitions to include in the archive file.

Deployment considerations

After the archive file is created, you deploy by using standard ColdFusion JEE configuration deployment techniques. For more information, see Installing an EAR file or WAR files in Installing the JEE Configuration of Installing ColdFusion.

Post-deployment considerations

Depending on your application, the resources that it uses, and the environment in which it is deployed, you may need to perform post-deployment configuration, as follows:

  • Mappings The ColdFusion mappings in the archived application refer to directories on the original computer. If those directories do not exist on the deployment computer, modify the ColdFusion mappings by using the ColdFusion Administrator or the Administrator API.
  • Serial number JEE deployment is a ColdFusion Enterprise feature. To upgrade to the Enterprise Edition, use the ColdFusion Administrator or the Administrator API to enter a serial number .For more information on the Administrator API, see Administrator API.

Deployment considerations

After the archive file is created, you deploy by using standard ColdFusion JEE configuration deployment techniques. For more information, see Installing an EAR file or WAR files in Installing the JEE Configuration of Installing ColdFusion.

Using the cfcompile utility

You can use the  cfcompile  utility for the following purposes:

  • Precompiling ColdFusion pages Precompile your application's CFM pages into Java class files. At runtime, ColdFusion does not have to compile CFM pages.
  • Sourceless distribution Create CFM pages as Java bytecode. You can deploy these CFM pages instead of CFML source code. The  cfcompile  utility is located in the cf_root/bin (server configuration) or cf_webapp_root/WEB-INF/ cfusion /bin (JEE configuration) directory. Before you can use the cfcompile utility in the JEE configuration, set the CFUSION_HOME, JEEJAR, and WEBINF variables in the cfcompile.sh/cfcompile.bat file.

Precompiling ColdFusion pages

You can use the cfcompile utility to precompile ColdFusion pages (CFM, CFC, and CFR files). This can enhance initial page loading time at runtime.
Use the following command to compile ColdFusion pages into Java classes:

cfcompile webroot [directory-to-compile]

The following table describes these parameters:

Parameter

Description

webroot

Fully qualified path to the web server root; for example, C:\Inetpub\wwwroot or C:\coldfusion10\cfusion\wwwroot.

directory-to-compile

Fully qualified path to the directory where the files to be compiled are located. This directory must be under the web root directory. If not specified, all ColdFusion templates in the web root directory are compiled.

Sourceless distribution

You can use the cfcompile utility with the deploy option to create ColdFusion pages (CFM, CFC, and CFR files) that contain Java bytecode. You can then deploy the bytecode versions of the ColdFusion pages instead of the original CFML source code.
Use the following command to compile CFML files into bytecode format that you can deploy instead of CFML source code:

cfcompile -deploy webroot directory-to-compile output-directory

The following table describes these parameters:

Parameter

Description

webroot

Fully qualified path to the web server root; for example, C:\Inetpub\wwwroot or C:\coldfusion10\cfusion\wwwroot.

directory-to-compile

Fully qualified path to the directory where the files to be compiled are located. This directory must be under the web root directory. This is required for the deploy option.

output-directory

Fully qualified path to the directory to contain the compiled deployable files. This cannot be the same directory as the source directory.

After you run the  cfcompile  utility, perform the following steps:

  1. Back up your original CFML files
  2. Copy the generated bytecode CFML files to the original directory
  3. Deploy the application.

    Note: The JEE Archive screen of the ColdFusion_ Administrator lets you create an EAR or WAR file that contains bytecode versions of your application's CFML files._

Get help faster and easier

New user?