O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The <cfcomponent> Tag

ColdFusion Components are defined using a tag named <cfcomponent>. (Intuitive, eh?) All of the code that makes up the CFC must be placed in between <cfcomponent> and </cfcomponent> tags (Listing 11.2). Nothing may be placed before the opening <cfcomponent> or after the closing </cfcomponent>.

Listing 11.2. intro.cfc—Introduction CFC Step 1
<!--- This is the introductory CFC --->
<cfcomponent>

</cfcomponent>

Once you have typed in this code, save your new file as intro.cfc. You have just created a ColdFusion Component. It does absolutely nothing at this point, but it’s a ColdFusion Component nonetheless.

Tip

I just stated that nothing can be before the opening <cfcomponent> or after the closing </cfcomponent>, but as you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required