The ColdFusion gateway directory

The ColdFusion MX installation includes a cf_root\WEB-INF\cfusion\gateway directory on J2EE configurations, or cf_root\gateway directory on server configurations. This directory contains all the code for ColdFusion example event gateways and example event gateway applications, and example configuration files for use by standard ColdFusion event gateways. You do not have to put your event gateways, event gateway application CFCs, or event gateway configuration files in this directory, but ColdFusion is configured to find event gateways and CFCs that you put there.

The following table lists the event gateway directory subdirectories, their purpose, and their initial contents. For more information on using the example event gateways and applications, see Using the example event gateways and gateway applications.

Directory

Purpose

cfc

Event gateway application CFCs. ColdFusion is installed with an Administrator Mapping between /gateway and this cfc directory.

cfc/examples

Code for the ColdFusion sample applications.

config

Configuration files for all ColdFusion event gateways, including standard ColdFusion MX event gateways, such as SMS, and example event gateways, such as the directory watcher event gateway.

doc/api

Javadoc for the Gateway, and GatewayHelper interfaces, and the CFEvent, GatewayServices, and GenericGateway classes that gateway developer use when writing gateways. This documentation is a subset of the information in the Gateway development interfaces and classes section in CFML Reference.

lib

Executable code for example and user-developed event gateway classes. The ColdFusion MX class loader includes this directory on its classpath and includes any JAR files that are in that directory on the class path. The examples.jar file in this directory contains the class files for the DirectoryWatcherGateway, EmptyGateway, and SocketGateway classes.

src/examples

Source code for the example event gateway classes that Macromedia provides. Includes the EmptyGateway.java file and the following subdirectories:

  • socket: Socket gateway source files
  • watcher: directory watcher gateway source files
  • JMS: JMS gateway source files