ColdFusion Support Center

Installing and Deploying ColdFusion MX 7 on Tomcat

Macromedia ColdFusion MX 7 supports the following configurations:

  • Server configuration - Lets you install one instance of ColdFusion MX 7 with an embedded Java 2 Enterprise Edition (J2EE) server. This configuration most closely resembles the ColdFusion MX base release and other releases prior to ColdFusion MX, such as ColdFusion 5 and ColdFusion 4.5. This was formerly known as the stand-alone configuration. For information on installing this configuration, see Installing and Using ColdFusion MX.
  • Multiserver configuration (Enterprise and Developer Editions only) - Installs JRun and automatically deploys ColdFusion MX 7 in a separate JRun server instance. For information on installing this configuration, see Installing and Using ColdFusion MX.
  • J2EE configuration (Enterprise and Developer Editions only) - Lets you deploy ColdFusion MX 7 as a Java application running on a Java 2 Enterprise Edition (J2EE) application server, such as JRun 4, IBM WebSphere, or BEA WebLogic. These instructions tell you how to deploy ColdFusion MX 7 on JRun 4.

When you run ColdFusion MX 7 in the J2EE configuration, you use the application server's deployment mechanism to deploy ColdFusion MX on a J2EE 1.3 compliant application server. The Installation Wizard lets you install ColdFusion MX as an enterprise application or as a web application. Web application support lets you deploy the ColdFusion MX J2EE configuration on stand alone J2EE web containers, such as Tomcat.

About this document

This document provides instructions for deploying and configuring ColdFusion MX in the J2EE configuration on Tomcat version 4.1.12 and later. It refers to overview information in Installing and Using ColdFusion MX, which is available on LiveDocs (English and Japanese only).

Conventions in this document

This document uses the following conventions to reference Tomcat and ColdFusion directories:

  • cfmx_install_directory - The directory that contains the files extracted by the ColdFusion MX Install Wizard; for example, C:\cfmx or /opt/cfmx.
  • tomcat_root - The directory that contains Tomcat; for example, C:\Program Files\Apache Group\Tomcat 4.1.
  • cf_webapp_root - The directory into which you deployed the ColdFusion MX web application; for example, C:\Program Files\Apache Group\Tomcat 4.1\webapps\cfusion.
  • java_home - The root directory of your Java 2 software development kit (J2SDK); for example, C:\j2sdk1.4.1.

Installing, deploying, and configuring ColdFusion MX 7

You deploy ColdFusion MX 7 in the J2EE configuration on Tomcat using WAR files in conjunction with Tomcat autodeploy.

Note: If you are updating a currently deployed version of ColdFusion MX on Tomcat, see the instructions in Enabling and Using ColdFusion MX Features on Your J2EE Server before continuing.

To install ColdFusion MX 7 on Tomcat:

  1. Run the ColdFusion MX 7 Install Wizard after downloading the platform-specific installer:
    • Windows - coldfusion-70-win.exe
    • Linux - coldfusion-70-lin.bin
    • Solaris - coldfusion-70-sol.bin
    • Other platforms - coldfusion-70-other.jar (run with java_home/bin/java -jar coldfusion-70-other.jar -i console)

    These installers are available on the Macromedia website. There is no Tomcat-specific installer; you can download any version that matches your platform.

  2. Answer the questions. When prompted, do the following:

    1. Select Developer Edition.
    2. Select J2EE configuration/WAR file
    3. Specify whether to install ODBC services (Windows only), search services, and supporting material.
    4. Specify the installation directories for ColdFusion MX and the Search Service.
    5. Select the Java Servlet API 2.3 or greater option.
    6. Specify a password for use with the ColdFusion MX Administrator.
    7. (Only if RDS is enabled) Specify a password for use with Remote Development Services (RDS).

      The Install Wizard places the cfusion.war and rds.war files in the installation directory.

  3. Stop the Tomcat server to which you will deploy ColdFusion MX.
  4. Copy the cfusion.war and rds.war files from the installation directory to the webapps directory.
  5. Rename the rds.war file to CFIDE.war (CFIDE must be all capital letters).
  6. Start your Tomcat server.

    Tomcat automatically detects the presence of the cfusion.war and CFIDE.war files, autodeploys them, and creates expanded cfusion and CFIDE subdirectories. This could take some time.

    Note: These instructions assume that you do not change the name of the cfusion.war file, which means that Tomcat deploys ColdFusion MX with a context root of cfusion.

  7. Stop your Tomcat server.
  8. (If using a 1.3.x JVM) Download and install the Java Cryptography Extension (JCE), as described in Enabling JCE for 1.3.x JVMs in Enabling and Using ColdFusion MX 7 Features on Your J2EE Server.
  9. ColdFusion MX 7 includes a 1.4.2 version of the tools.jar file. If Tomcat uses a different JDK version, rename your tomcat_root/webapps/cfusion/WEB-INF/cfusion/lib/tools.jar file to something else (for example, tools.old).
  10. If you plan on using sandbox security, perform the following steps:

    1. Enable the Java security manager by passing the -security option at Tomcat startup.
    2. Rename the tomcat_root/conf/catalina.policy file.
    3. Create a new file in tomcat_root/conf and name it catalina.policy.
    4. Add the following lines to the new catalina.policy file:

      grant {
    5. Save the file.
  11. (Windows, Linux, and Solaris) Create a batch file (Windows) or shell script (Linux and Solaris) to establish environment variables and JVM options used when starting Tomcat. Name this file setenv.bat (Windows) or (Linux and Solaris) and store it in the tomcat_root/bin directory. At Tomcat startup, the catalina.bat file (Windows) or file (Linux and Solaris) automatically calls the setenv file. This file must perform the following steps:

    • Add the following ColdFusion binary file directories to the system path:

      ColdFusion MX binaries - cf_webapp_root/WEB_INF/cfusion/lib

      jIntegra binaries (Windows only, COM support) - cf_webapp_root/WEB-INF/cfusion/jintegra/bin and cf_webapp_root/WEB-INF/cfusion/jintegra/bin/international

    • Charting (1.3.x JVMs only) - For instructions on enabling charting on servers that use a 1.3.x JVM, see cf_webapp_root/WEB-INF/cfusion/charting/java1.3/readme.txt.
    • Set JVM options to enable COM (Windows-only), graphing (required for Linux and Solaris), and CORBA support.

    The following example Windows batch file sets the system path and adds JVM options to the JAVA_OPTS environment variable, which is used in the startup command:

    rem Set a few variables.
    set JAVA_HOME=j2sdk1.4.2_05
    set CF_WEB_INF="C:\Program Files\Apache Group\Tomcat 4.1\webapps\cfusion\WEB-INF"
    rem Concatenate binary file directories into a single variable.
    set CF_SHARED_LIB=%CF_WEB_INF%/cfusion/lib
    rem The following variable must be on a single line.
    set CF_SHARED_LIBS=%CF_SHARED_LIB%;%CF_WEB_INF%/cfusion/jintegra/bin;%CF_WEB_INF%/WEB-INF/cfusion/jintegra/bin/international
    rem Add libraries for binary files to the Windows system path. 
    rem Set JVM options for CORBA. Uncomment this line if vbjorb.jar is not in
    rem your JRE's lib/ext directory.
    rem set CF_CORBA_JVM_OPTIONS=-Xbootclasspath/a:"%CF_WEB_INF%/lib/vbjorb.jar
    rem Populate JAVA_OPTS, which will be used by the catalina.bat file
    rem when starting the JVM.

    The following example UNIX shell script sets the system path and adds JVM options to the JAVA_OPTS environment variable, which is used in the startup command:

    # Establish variables.
    # Add binary file directories to the system path. 
    # Establish graphics JVM options.
    # Set JVM options for CORBA. Use if vbjorb.jar is not in your JRE's
    # lib/ext directory. If used, append $CF_CORBA_JVM_OPTIONS to CF_JVM_OPTIONS.
    # CF_CORBA_JVM_OPTIONS=-Xbootclasspath/a:"$CF_WEB_INF/lib/vbjorb.jar"
    JAVA_OPTS="$CF_JVM_OPTIONS -Xms128m -Xmx256m"
    export LD_LIBRARY_PATH
  12. Start the Tomcat server and monitor startup messages and log files to ensure that all configurations were applied successfully.
  13. Start the ColdFusion MX Administrator and run the Configuration Wizard. You start the Administrator using a URL of the form http://hostname:portnumber/cfusion/CFIDE/administrator/index.cfm, as follows:

    • hostname - The machine name, IP address, localhost, or
    • portnumber - The port number of the Tomcat web server (typically 8080).
  14. Code and test ColdFusion (CFM) pages. Store these pages in the cfusion web application root directory. For example, to display a CFM file located at /Jakarta-4.1.18/webapps/cfusion/eisapp/index.cfm, you could specify the URL as\
  15. (Optional, Windows-only) Install the Report Builder and Dreamweaver extensions, as described in Installing optional components in Enabling and Using ColdFusion MX 7 Features on Your J2EE Server

Usage notes


When you start Tomcat with -Duser.language=ja -Duser.region=JP, the getLocale function returns English(US) instead of Japanese.

Setting the crossContext attribute to enable RDS

If you deployed the RDS application, you must also set the crossContext attribute to true for the CFIDE web application. You do this through the Tomcat Administrator. You can also set the crossContext attribute by modifying the server.xml file directly (not explained in this document).

To set the crossContext attribute through the Tomcat Administrator:

  1. Restart Tomcat.
  2. Open the Tomcat Administrator (http://servername:8080/admin). If you've never used the Administrator, open the tomcat_root/conf/tomcat-users.xml file in a text editor and define a user in the admin role.
  3. Select Tomcat Server > Service (Tomcat-Standalone) > Host (localhost).
  4. Click the Context (/CFIDE) option.
  5. Set the Cross Context field to true.
  6. Click Save.
  7. Click Commit Changes.

Deploying archives created in the server configuration

These instructions describe how to deploy the WAR files created by the ColdFusion MX 7 Install Wizard. You can also deploy WAR files created using the J2EE Archives page in the ColdFusion MX Adminstrator. However, if you create a WAR file in the J2EE Archives page when running ColdFusion MX in the server configuration, you must modify the web.xml file to ensure a successful deployment. This issue does not apply to WAR files created using the multiserver or J2EE configurations.

If you created a WAR file when running the ColdFusion MX Administrator in the server configuration, perform the following steps to deploy the application:

  1. Create the WAR file using the J2EE Archives page of the ColdFusion MX Administrator.
  2. Deploy the WAR file in Tomcat. The deployment will fail.
  3. Stop Tomcat.
  4. Open the cf_webapp_root/WEB-INF/web.xml file in a text editor.
  5. Locate the servlet-mapping element for macromedia_mapping_6.
  6. Comment out the servlet-mapping elements for macromedia_mapping_6, macromedia_mapping_7, and macromedia_mapping_8.

    These mappings use Search Engine Safe URL patterns, which are not supported by Tomcat.

  7. Save the web.xml file.
  8. Start Tomcat.

Top Support Topics


More ColdFusion Topics

Choose a category to see more topics.

Request Support


Additional ColdFusion Resources


ColdFusion Downloads