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 ...
Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.