Accessibility

Flex Documentation

Installing Flex on ColdFusion MX

This document contains instructions on installing the Macromedia Flex 1.0 application and the Flex sample applications on ColdFusion MX, as described in the following sections:

Installing Flex on ColdFusion MX Overview

You can install Macromedia Flex with the J2EE version of ColdFusion MX so that your ColdFusion applications can use MXML tags and serve up *.mxml pages. You can also embed the Flex custom tag library in ColdFusion pages.

NOTE: To run Flex, your application server must be listed as a supported server in the Flex installation instructions. Not all application servers that run ColdFusion MX can also run Flex.

These instructions describe how to extract the contents of the following Flex WAR files and add them to your ColdFusion installation so that you can write Flex applications and run the Flex samples:

  • flex.war — The primary Flex WAR file.
  • samples.war — Example Flex applications.

Each WAR file is a separate, standalone application. Do not install the samples.war file in the same application directory as the flex.war file. Instead, install it as separate application on your server with its own directory structure and context.

Flex and ColdFusion MX provide their services through servlets. The servlets are deployed through the web application deployment descriptors (web.xml). Flex and ColdFusion each have their own class loading mechanism. They load their classes from specific classpaths instead of the application server's environment classpaths.

Installing the flex.war file on ColdFusion MX

This section describes how to integrate the Flex and ColdFusion MX web.xml files into a single deployment descriptor so that Flex runs with the ColdFusion MX application. After you complete this procedure, you can copy MXML pages to your ColdFusion application directory and make requests to them just as you can to CFM pages.

To run the Flex samples, you must perform a separate, but similar, set of steps as described in Installing the Flex samples on ColdFusion MX.

To install the flex.war file on ColdFusion MX:

  1. Run the Flex installer to copy the Flex files to your flex_install_root directory (for example, C:/Program Files/Macromedia/Flex/).
  2. Extract the contents of the flex_install_root/flex.war file to a temporary directory (such as C:/temp/flextemp/) using WinZip or other archiving utility.
  3. Stop your ColdFusion server.
  4. Edit /WEB-INF/flex/flex-config.xml to disable Flex file logging, by setting logging | file | enable to false:
    <logging>
        <console>
            <enable>true</enable>
            <level>info</level>
        </console>
        <file>
            <enable>false</enable>
            <level>info</level>
            <file-name>/WEB-INF/flex/logs/flex.log</file-name>
            <maximum-size>200KB</maximum-size>
            <maximum-backups>3</maximum-backups>
        </file>
    </logging>  
  5. Copy the /flex subdirectory in the {flextemp}/flex/WEB-INF directory to the ColdFusion MX cf_root/WEB-INF directory.

    NOTE: Copy only the {flextemp}/flex/WEB-INF/flex directory to the ColdFusion MX environment in this step. You merge the Flex web.xml file and the ColdFusion MX web.xml file in a later set of steps.

  6. Copy the {flextemp}/flex/WEB-INF/lib/flex-bootstrap.jar file to the ColdFusion MX cf_root/WEB-INF/lib directory.
  7. Move all assets required by your custom Flex applications into the new location within the ColdFusion MX directory structure.
  8. Merge the Flex web.xml file with the ColdFusion MX web.xml file. Next, you copy some of the contents from the {flextemp}/flex/WEB-INF/web.xml file to the cf_root/WEB-INF/web.xml file.
    1. Open the ColdFusion web.xml file.
    2. Replace the DOCTYPE definition at the top of the ColdFusion MX web.xml file with the following DOCTYPE definition:
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
      Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      The latest web-app DTD includes support for servlet filters, which ColdFusion MX does not include by default.

      NOTE: Not all application servers support the 2.3 Servlet API. For more information, see the documentation for your application server.

    3. Copy the context parameters, filters, filter mappings, listeners, and servlet definitions from the Flex web.xml file to the appropriate sections in the ColdFusion MX web.xml file. Copy each of these elements to the end of the matching section in the ColdFusion MX configuration file. For example, when copying the Flex filter mappings, add them after the ColdFusion MX filters mappings but before the next set of elements. Be sure to maintain the order of the XML blocks in the way that they appear in the Flex web.xml file.
      Copy the following context parameters from the Flex web.xml file to the ColdFusion MX web.xml file:
      • flex.class.path
      • flex.configuration.file
      • flex.listener.class

      Copy the following filters from the Flex web.xml file to the ColdFusion MX web.xml file:
      • FlexDetectionFilter
      • FlexCacheFilter

      Copy the following filter mappings from the Flex web.xml file to the ColdFusion MX web.xml file:
      • FlexDetectionFilter
      • FlexCacheFilter (two mappings)

      Copy the following listener from the Flex web.xml file to the ColdFusion MX web.xml file:
      • flex.bootstrap.BootstrapListener

      Copy the following servlet definitions from the Flex web.xml file to the ColdFusion MX web.xml file:
      • FlexProxyServlet
      • FlexErrorServlet
      • FlexInternalServlet
      • FlexSwfServlet
      • FlexMxmlServlet
      • FlexAxisServlet
      • FlashGatewayServlet
      • FlexForbiddenServlet
      • session

      Copy the following servlet mappings from the Flex web.xml file to the ColdFusion MX web.xml file:
      • FlashGatewayServlet
      • FlexProxyServlet
      • FlexAxisServlet
      • FlexErrorServlet
      • FlexInternalServlet
      • FlexMxmlServlet
      • FlexSwfServlet
      • FlexSwfServlet
      • FlexForbiddenServlet
    4. Copy the Flex tag library definition from the Flex web.xml file to the ColdFusion MX web.xml file. Add it to the ColdFusion MX web.xml file after the </welcome-file-list>.
  9. Save the ColdFusion MX web.xml file and restart your ColdFusion MX server.

Example of merged web.xml file

The merged web.xml file should look similar to the following, although your ColdFusion MX settings might be different:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.2//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app id="macromedia_coldfusion"> <display-name>Macromedia Coldfusion MX</display-name> <description>Macromedia Coldfusion MX</description> <context-param id="macromedia_context_1"> <param-name>cftags</param-name> <param-value>/WEB-INF/cftags</param-value> <description>Path to search for built-in tags. Relative to
application root. This parameter can only be one path element.</description> </context-param> <context-param id="macromedia_context_2"> <param-name>coldfusion.compiler.outputDir</param-name> <param-value>/WEB-INF/cfclasses</param-value> <description>This is the directory where we will place compiled pages. It must be relative to the webapp root.</description> </context-param> <context-param id="macromedia_context_3"> <param-name>coldfusion.compiler.saveJava</param-name> <param-value>false</param-value> <description>Set this to "true" to produce java files for
debugging</description> </context-param> <context-param id="macromedia_context_4"> <param-name>cfx.registry.nativelibrary</param-name> <param-value>cfregistry</param-value> <description>Native library that implements CFX_REGISTRY. Used on Windows only.</description> </context-param> <context-param id="macromedia_context_5"> <param-name>cfx.report.nativelibrary</param-name> <param-value>cfreport</param-value> <description>Native library that implements CFX_REPORT. Used on Windows only.</description> </context-param> <context-param id="macromedia_context_6"> <param-name>cfx.collection.nativelibrary</param-name> <param-value>cfcollection</param-value> <description>Native library that implements CFX_COLLECTION.
</description> </context-param> <context-param id="macromedia_context_7"> <param-name>cfx.index.nativelibrary</param-name> <param-value>cfindex</param-value> <description>Native library that implements CFX_INDEX.</description> </context-param> <context-param id="macromedia_context_8"> <param-name>cfx.search.nativelibrary</param-name> <param-value>cfsearch</param-value> <description>Native library that implements CFX_SEARCH.</description> </context-param> <context-param id="macromedia_context_88"> <param-name>cf.class.path</param-name> <param-value>./WEB-INF/cfusion/lib/cfusion.jar</param-value> </context-param> <context-param> <param-name>flex.class.path</param-name> <param-value>./WEB-INF/flex/jars</param-value> </context-param> <context-param> <param-name>flex.configuration.file</param-name> <param-value>/WEB-INF/flex/flex-config.xml</param-value> <description>configuration file</description> </context-param> <context-param> <param-name>flex.listener.class</param-name> <param-value>flex.cache.DependencyCheckerService</param-value> </context-param> <filter> <filter-name>FlexDetectionFilter</filter-name> <filter-class>flex.bootstrap.BootstrapFilter</filter-class> <init-param> <param-name>filter.class</param-name> <param-value>flex.detection.DetectionFilter</param-value> </init-param> </filter> <filter> <filter-name>FlexCacheFilter</filter-name> <filter-class>flex.bootstrap.BootstrapFilter</filter-class> <init-param> <param-name>filter.class</param-name> <param-value>flex.cache.CacheFilter</param-value> </init-param> </filter> <filter-mapping> <filter-name>FlexDetectionFilter</filter-name> <servlet-name>FlexMxmlServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>FlexCacheFilter</filter-name> <servlet-name>FlexMxmlServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>FlexCacheFilter</filter-name> <servlet-name>FlexSwfServlet</servlet-name> </filter-mapping> <listener> <listener-class>flex.bootstrap.BootstrapListener</listener-class> </listener> <!-- Flash Web Services Proxy --> <servlet> <servlet-name>FlexProxyServlet</servlet-name> <display-name>Flex Web Services Proxy Servlet</display-name> <description>Optional proxy for relaying web services messages
</description> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.flashproxy.ProxyServlet</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet> <servlet-name>FlexErrorServlet</servlet-name> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.mxml2.ErrorPageServlet</param-value> </init-param> </servlet> <servlet> <servlet-name>FlexInternalServlet</servlet-name> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.filemanager.FileManagerServlet</param-value> </init-param> <load-on-startup>10</load-on-startup> </servlet> <servlet> <servlet-name>FlexSwfServlet</servlet-name> <display-name>SWF Retreiver</display-name> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.swfmanager.SwfServlet</param-value> </init-param> <!-- SwfServlet must be initialized after MxmlServlet --> <load-on-startup>4</load-on-startup> </servlet> <servlet> <servlet-name>FlexMxmlServlet</servlet-name> <display-name>MXML Processor</display-name> <description>Servlet wrapper for the Mxml Compiler</description> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.mxml2.MxmlServlet</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <!-- Axis --> <servlet> <servlet-name>FlexAxisServlet</servlet-name> <display-name>Apache-Axis Servlet</display-name> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.remote.CustomAxisServlet</param-value> </init-param> </servlet> <!-- Flash Remoting MX 1.1 --> <servlet> <servlet-name>FlashGatewayServlet</servlet-name> <display-name>Flash Remoting MX Servlet</display-name> <description>Servlet-based plugin to Flash Remoting</description> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flashgateway.controller.GatewayServlet</param-value> </init-param> <init-param> <param-name>gateway.configuration.file</param-name> <param-value>/WEB-INF/flex/gateway-config.xml</param-value> </init-param> <init-param> <param-name>whitelist.configuration.file</param-name> <param-value>/WEB-INF/flex/flex-config.xml</param-value> </init-param> <init-param> <param-name>whitelist.parent.node</param-name> <param-value>remote-objects</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>FlexForbiddenServlet</servlet-name> <display-name>Prevents access to *.as files</display-name> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.util.ForbiddenServlet</param-value> </init-param> </servlet> <servlet> <servlet-name>session</servlet-name> <display-name>Provides access to the current session; for use with
RemoteObject</display-name> <servlet-class>flex.bootstrap.BootstrapServlet</servlet-class> <init-param> <param-name>servlet.class</param-name> <param-value>flex.remote.Session</param-value> </init-param> </servlet> <servlet id="macromedia_servlet_1"> <servlet-name>ColdFusionStartUpServlet</servlet-name> <display-name>Coldfusion MX Startup Servlet</display-name> <description>Initializes ColdFusion</description> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_1034013110641"> <param-name>servlet.class</param-name> <param-value>coldfusion.server.j2ee.CFStartUpServlet
</param-value> </init-param> <init-param id="InitParam_1034013110642"> <param-name>cfRootDir</param-name> <param-value>./WEB-INF/cfusion</param-value> </init-param> <init-param id="InitParam_1034013110643"> <param-name>appServer</param-name> <param-value>J2EE</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet id="macromedia_servlet_11"> <servlet-name>FlashGateway</servlet-name> <display-name>Flash Gateway</display-name> <description>Allows flash to connect to CFML and CFC templates.
</description> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParamdca"> <param-name>DISABLE_CFWS_ADAPTERS</param-name> <param-value>true</param-value> <description>When set to true, this setting disables the
ColdFusion WebServices Adapters in the gateway.</description> </init-param> <init-param> <param-name>DISABLE_SERVER_AUTHENTICATION</param-name> <param-value>false</param-value> <description>When set to true, this setting disables the server
authentication of users.</description> </init-param> <init-param id="InitParam_103401311064890"> <param-name>servlet.class</param-name> <param-value>flashgateway.controller.GatewayServlet</param-value> </init-param> <init-param id="InitParam_1034013110642x"> <param-name>cfRootDir</param-name> <param-value>./WEB-INF/cfusion</param-value> </init-param> <init-param id="InitParam_1034013110643a"> <param-name>appServer</param-name> <param-value>J2EE</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet id="macromedia_servlet_3"> <servlet-name>CfmServlet</servlet-name> <display-name>CFML Template Processor</display-name> <description>Compiles and executes CFML pages and tags</description> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_1034013110656ert"> <param-name>servlet.class</param-name> <param-value>coldfusion.CfmServlet</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet id="macromedia_servlet_4"> <servlet-name>GraphServlet</servlet-name> <display-name>GraphServlet</display-name> <description>Serves up graph data</description> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_1034013110657xx"> <param-name>servlet.class</param-name> <param-value>coldfusion.graph.GraphServlet</param-value> </init-param> </servlet> <servlet id="macromedia_servlet_5"> <servlet-name>CFCServlet</servlet-name> <display-name>CFC Processor</display-name> <description>Compiles and executes CF web components</description> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_1034013110657ax"> <param-name>servlet.class</param-name> <param-value>coldfusion.xml.rpc.CFCServlet</param-value> </init-param> <load-on-startup>10</load-on-startup> </servlet> <servlet id="macromedia_servlet_8789"> <servlet-name>RDSServlet</servlet-name> <display-name>Apache-Axis Servlet</display-name> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_103401311065856789"> <param-name>servlet.class</param-name> <param-value>coldfusion.rds.RdsFrontEndServlet</param-value> </init-param> </servlet> <servlet id="macromedia_servlet_8"> <servlet-name>AxisServlet</servlet-name> <display-name>Apache-Axis Servlet</display-name> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_1034013110658x"> <param-name>servlet.class</param-name> <param-value>org.apache.axis.transport.http.AxisServlet
</param-value> </init-param> </servlet> <servlet id="macromedia_servlet_9"> <servlet-name>AdminServlet</servlet-name> <display-name>Axis Admin Servlet</display-name> <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_1034013110659e"> <param-name>servlet.class</param-name> <param-value>org.apache.axis.transport.http.AxisServlet
</param-value> </init-param> <load-on-startup>100</load-on-startup> </servlet> <!-- Flash Remoting Gateway URL --> <servlet-mapping> <servlet-name>FlashGatewayServlet</servlet-name> <url-pattern>/gateway</url-pattern> </servlet-mapping> <!-- Flash Web Services Proxy URL --> <servlet-mapping> <servlet-name>FlexProxyServlet</servlet-name> <url-pattern>/flashproxy/*</url-pattern> </servlet-mapping> <!-- Axis server/proxy URL --> <servlet-mapping> <servlet-name>FlexAxisServlet</servlet-name> <url-pattern>/flex-ws/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexErrorServlet</servlet-name> <url-pattern>/flex-error</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexInternalServlet</servlet-name> <url-pattern>/flex-internal/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexMxmlServlet</servlet-name> <url-pattern>*.mxml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexSwfServlet</servlet-name> <url-pattern>*.swf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexForbiddenServlet</servlet-name> <url-pattern>*.as</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_1"> <servlet-name>FlashGateway</servlet-name> <url-pattern>/flashservices/*</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_2"> <servlet-name>GraphServlet</servlet-name> <url-pattern>/CFIDE/GraphData</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_3"> <servlet-name>CfmServlet</servlet-name> <url-pattern>*.cfm</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_4"> <servlet-name>CFCServlet</servlet-name> <url-pattern>*.cfc</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_5"> <servlet-name>RDSServlet</servlet-name> <url-pattern>/CFIDE/main/ide.cfm</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_6"> <servlet-name>AxisServlet</servlet-name> <url-pattern>servlet/AxisServlet</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_7"> <servlet-name>AxisServlet</servlet-name> <url-pattern>*.jws</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_8"> <servlet-name>AxisServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_9"> <servlet-name>AdminServlet</servlet-name> <url-pattern>servlet/AdminServlet</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_10"> <servlet-name>GraphServlet</servlet-name> <url-pattern>/CFIDE/GraphData.cfm</url-pattern> </servlet-mapping> <!-- Flex's Servlets mapping begin --> <!-- Flash Web Services Proxy URL --> <servlet-mapping> <servlet-name>FlexProxyServlet</servlet-name> <url-pattern>/flashproxy</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexHistoryServlet</servlet-name> <url-pattern>/flex-history</url-pattern> </servlet-mapping> <!-- Axis server/proxy URL --> <servlet-mapping> <servlet-name>FlexAxisServlet</servlet-name> <url-pattern>/flex-ws/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexMxmlServlet</servlet-name> <url-pattern>*.mxml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FlexSwfServlet</servlet-name> <url-pattern>*.swf</url-pattern> </servlet-mapping> <!-- use the same servlet for retrieving SWD debugging files --> <servlet-mapping> <servlet-name>FlexSwfServlet</servlet-name> <url-pattern>*.swd</url-pattern> </servlet-mapping> <!-- Flex's Servlets mapping end --> <servlet-mapping> <servlet-name>FlexForbiddenServlet</servlet-name> <url-pattern>*.as</url-pattern> </servlet-mapping> <welcome-file-list id="WelcomeFileList_1034013110672"> <welcome-file>index.cfm</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> </welcome-file-list> <!--Flex Custom Tag --> <taglib> <taglib-uri>FlexTagLib</taglib-uri> <taglib-location>/WEB-INF/lib/flex-bootstrap.jar</taglib-location> </taglib> </web-app>

Installing the Flex samples on ColdFusion MX

This section describes how to install the Flex samples on ColdFusion MX. It assumes that you have already extracted the samples.war file from the Flex download using the instructions in Installing the flex.war file on ColdFusion MX.

The instructions in this section involve merging Flex and ColdFusion configuration files. When merging files, copy each of the elements to the end of the matching section in the ColdFusion MX configuration file. For example, when copying the Flex filter mappings, add them after the ColdFusion MX filters mappings but before the next set of elements. Be sure to maintain the order of the XML blocks in the way that they appear in the Flex samples configuration files.

NOTE: Do not copy the SamplesAxisServlet and SamplesAxisServlet servlet mappings when merging the Flex samples and ColdFusion MX web.xml files. Also, do not copy the AdminService when merging the server-config.wsdd files.

To install the Flex samples on ColdFusion MX:

  1. Extract the contents of the flex_install_root/samples.war file to a temporary directory (such as C:/temp/samplestemp/) using WinZip or other archiving utility.
  2. Stop your ColdFusion server.
  3. Edit the {samplestemp}/WEB-INF/samples/flex-config.xml file to disable Flex file logging, by setting logging | file | enable to false; for example:
    <logging>
     <console>
      <enable>true</enable>
       <level>info</level>
     </console>
     <file>
      <enable>false</enable>
      <level>info</level>
      <file-name>/WEB-INF/flex/logs/flex.log</file-name>
      <maximum-size>200KB</maximum-size>
      <maximum-backups>3</maximum-backups>
     </file>
    </logging>
    
  4. Copy the {samplestemp}/WEB-INF/flex subdirectory to the ColdFusion MX cf_root/WEB-INF directory.

    NOTE:
    Do not copy the Flex web.xml or resources other than the {samplestemp}/WEB-INF/flex directory to the ColdFusion environment in this step. You will be merging the samples web.xml file and the ColdFusion MX web.xml file in a later set of steps.
  5. From the {samplestemp} directory, copy the blogreader, dataModel, explorer, flexstore, occ, reskinnedOcc folders and the index.htm and xd.cdd files to the cf_root directory.
  6. Copy all files from the {samplestemp}/WEB-INF/lib directory to the ColdFusion cf_root/WEB-INF/lib directory.
  7. Copy the samples folder from the {samplestemp}/WEB-INF/classes to the ColdFusion cf_root/WEB-INF/classes directory.
  8. Merge the Flex samples web.xml file with the ColdFusion web.xml file. You will copy some of the contents from the {samplestemp}/WEB-INF/web.xml file to the cf_root/WEB-INF/web.xml file.
    1. Open the ColdFusion web.xml file.
    2. Replace the DOCTYPE definition at the top of the ColdFusion web.xml file with the following DOCTYPE definition:
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
      Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    3. Copy the following context parameters from the Flex samples web.xml file to the ColdFusion web.xml file:
      • flex.class.path
      • flex.configuration.file
      • flex.listener.class
    4. Copy the following filters from the Flex samples web.xml file to the ColdFusion web.xml file:
      • FlexDetectionFilter
      • FlexCacheFilter
      • SampleSecurityFilter
    5. Copy the following filter mappings from the Flex samples web.xml file to the ColdFusion web.xml file:
      • FlexDetectionFilter
      • FlexCacheFilter (two mappings)
    6. Copy the three Flex samples filter mappings for the SampleSecurityFilter to the ColdFusion web.xml file. All three have the same name, but are mapped to three different URL patterns.
    7. Copy the following listener from the Flex samples web.xml file to the ColdFusion web.xml file:
      • flex.bootstrap.BootstrapListener
    8. Copy the following servlet definitions from the Flex samples web.xml file to the ColdFusion web.xml file:
      • FlexProxyServlet
      • FlexErrorServlet
      • FlexInternalServlet
      • FlexSwfServlet
      • FlexMxmlServlet
      • FlexAxisServlet
      • FlexForbiddenServlet
      • session
      • AMFGatewayServlet


      • NOTE: Do NOT copy the SamplesAxisServlet servlet definition.

    9. Copy the following servlet mappings from the Flex samples web.xml file to the ColdFusion web.xml file:
      • AMFGatewayServlet
      • FlexProxyServlet
      • FlexAxisServlet
      • FlexErrorServlet
      • FlexInternalServlet
      • FlexMxmlServlet
      • FlexSwfServlet (two mappings)
      • FlexForbiddenServlet (two mappings)


      • NOTE: Do NOT copy the SamplesAxisServlet servlet mapping.

    10. Copy the following error page mappings for error codes and exception types from the Flex samples web.xml file to the ColdFusion web.xml file:
      • 404
      • 403
      • 500
      • javax.servlet.jsp.JspException
      • javax.servlet.ServletException
    11. Copy the Flex tag library definition from the Flex samples web.xml file to the ColdFusion web.xml file. Add it to the ColdFusion web.xml file after the </welcome-file-list>.
    12. Copy the login-config definition from the Flex samples web.xml file to the ColdFusion web.xml file.
    13. Save the ColdFusion web.xml file.
  9. Merge the Flex samples server-config.wsdd with the ColdFusion server-config.wsdd.
    1. Open the cf_root/WEB-INF/server-config.wsdd file.
    2. Copy the following services from the {samplestemp}/WEB-INF/server-config.wsdd to the cf_root/WEB-INF/server-config.wsdd, directly below the beanMapping service:
      • SalaryWS
      • ContactManagerWS
      • TentsInventory
      • CatalogWS
      • SlowServiceSimulatorWS
      • EmployeeWS


      • NOTE: Do not copy the Flex AdminService service to the ColdFusion server-config.wsdd file.

    3. Save the ColdFusion server-config.wsdd file.
  10. Start your ColdFusion server.

Getting Started

 

Application Development

 

Security

 

Downloads

 

Documentation

 

Community Resources