Getting Started
Setting Up
Studio Files
Class Library
Server Mappings
It's Alive!
Garbage
Creating Objects
Invoking Methods
Using Events

Tag Reference

Object Reference

Download

Mailing List

Other Links


Now that all of the files have been installed, it's time to let your application know that you are using cfObjects. There are two files that are recommneded for every ColdFusion project - application.cfm and onrequestend.cfm - that need to be modified.

Application.cfm

This file must contain a call to the cfoInit tag. The syntax for this call depends on an earlier question about whether or not you have control over the CUSTOMTAGS directory. If you answered "no" to that question, then you have what is called a "Shared Server Deployment". Now click on the cfoInit button in your cfObjects toolbar and a dialog box will appear that looks like this:

Internal Host Deployments
If you have an Internal Host Deployment then you will enter in both of the ColdFusion Server mappings you created in Step 4 delimited with a comma into the Library Path box.
   Example: cfobjects,myClasses

Shared Server Deployments
If you have a Shared Server Deployment then you will enter in the name of the subdirectory you created to hold your classes for your application in Step 3 followed by a slash into the Library Path box.
    Example: classes/

You will also need to set the Shared Server drop down control to 'YES', check the Shared Server Deployment checkbox and then enter in relative path to the base tags in the Path to Class Dir box. In this case, the cfoInit tag is located in the class library directory, so you'll simply enter 'classes/'. The image below shows what it should look like if done properly.


Now you can click ok and here's what will appear in your application.cfm file.

Internal Host Deployments
<cf_cfoInit
   libPath="cfObjects,MyClasses"
   purgeClassregistry="no"
   remoteCFO="no"
   debug="no"
   dumpClassRegistry="no"
   dumpObjectPool="no"
   dumpHandlerPool="no">

Shared Server Deployments
<cfmodule template="classes/cfoInit.cfm"
   libPath="classes/"
   purgeClassregistry="no"
   remoteCFO="yes"
   debug="no"
   dumpClassRegistry="no"
   dumpObjectPool="no"
   dumpHandlerPool="no">

Move to Step 6 -->











SourceForge.net Logo