Cover image for Programming ColdFusion MX, 2nd Edition

Book description

ColdFusion has enjoyed widespread use among developers as apowerful, easy-to-learn platform for creating and deploying dynamicweb applications. ColdFusion's simple, tag-based language makes iteasy to handle basic tasks, like processing form data and queryingdatabases, but the language is also powerful enough to deliverhighly scalable, robust applications. And now that Macromedia hasintegrated ColdFusion into its MX family of technologies,ColdFusion is capable of interacting with Flash MX applications,which opens up even more possibilities. The first edition of thisbook has been praised as "the best reference book available on thesubject." This new edition, Programming ColdFusion MX, 2ndEdition, goes even further, documenting new techniques for usingColdFusion MX 6.1 to develop and serve dynamic web page content.This exhaustive guide covers everything from the basics to advancedtopics, with numerous examples that you can use for your ownapplications. Contents include:

  • Sharing application data using the web application frameworkand shared scope variables

  • Accessing databases, maintaining database records, and advanceddatabase techniques such as drill-down queries, query caching, andquery of queries

  • Integrating applications with ColdFusion MX's new securityframework

  • Interacting with other data sources, including LDAPdirectories, email servers, and other web servers

  • Extending ColdFusion with user-defined functions (UDFs), customtags, and ColdFusion Components (CFCs)

  • Advanced topics such as working with XML, consuming andproducing web services, and integrating ColdFusion with Flash viaFlash Remoting

  • Reference material for all the tags and functions that compriseCFML, the ColdFusion Markup Language

  • Programming ColdFusion MX, 2nd Edition, covers ColdFusion MX6.1, the latest release of ColdFusion, and is packed with advancedstrategies, insider hints, tips, and tricks for creating effectiveweb applications. If you are a ColdFusion developer, you need thisbook to help you make the most out of ColdFusion MX.

    Table of Contents

    1. Special Upgrade Offer
    2. A Note Regarding Supplemental Files
    3. Copyright
    4. Preface
      1. What’s New in ColdFusion MX
      2. Readers of the First Edition
      3. Audience
      4. Organization
      5. Conventions Used in This Book
      6. Comments and Questions
      7. Acknowledgments
    5. 1. Introducing ColdFusion
      1. 1.1. What Is ColdFusion?
      2. 1.2. ColdFusion Architecture
      3. 1.3. Getting Started with ColdFusion
    6. 2. ColdFusion Basics
      1. 2.1. Getting Started
        1. 2.1.1. Saving CFML Templates
        2. 2.1.2. Tag Syntax
        3. 2.1.3. Comments
      2. 2.2. Datatypes
      3. 2.3. Variables
        1. 2.3.1. Variable Names
        2. 2.3.2. Assigning Values to Variables
        3. 2.3.3. Variable Scope
        4. 2.3.4. Specifying Default Values Using cfparam
      4. 2.4. Expressions
        1. 2.4.1. Operators
        2. 2.4.2. Functions
      5. 2.5. Writing Output
        1. 2.5.1. Using Pound Signs Within Expressions
          1. 2.5.1.1. Including an expression within a string
          2. 2.5.1.2. Including expressions within tag attributes
        2. 2.5.2. Nested Pound Signs
        3. 2.5.3. Escaping Pound Signs
      6. 2.6. Conditional Processing
        1. 2.6.1. cfif, cfelseif, and cfelse
        2. 2.6.2. cfswitch, cfcase, and cfdefaultcase
        3. 2.6.3. IIF
      7. 2.7. Looping
        1. 2.7.1. Index Loops
        2. 2.7.2. Conditional Loops
      8. 2.8. Including Other Templates
    7. 3. Passing Data Between Templates
      1. 3.1. Passing Parameters Via URL
        1. 3.1.1. Dealing with Special Characters
        2. 3.1.2. Obtaining a List of All Available URL Parameters
      2. 3.2. Passing Data Using Forms
        1. 3.2.1. Handling Specific Types of Form Fields
          1. 3.2.1.1. Multiple selection lists
          2. 3.2.1.2. Checkboxes and radio buttons
        2. 3.2.2. Using Hidden Form Fields
        3. 3.2.3. Automatically Validating Form-Field Data
        4. 3.2.4. Manually Validating Form-Field Data
        5. 3.2.5. Obtaining a List of All Available Form Variables
      3. 3.3. Dealing with Nonexistent Parameters
    8. 4. Database Basics
      1. 4.1. Configuring Data Sources
        1. 4.1.1. Configuring a Data Source in the ColdFusion Administrator
        2. 4.1.2. Additional Resources
      2. 4.2. Introducing cfquery
      3. 4.3. A Quick SQL Primer
      4. 4.4. Retrieving and Displaying Data
        1. 4.4.1. Creating the Example Database
        2. 4.4.2. Retrieving Data from a Data Source
        3. 4.4.3. Outputting Query Results
        4. 4.4.4. Obtaining Additional Query Information
      5. 4.5. Sorting Query Results
      6. 4.6. Grouping Output
      7. 4.7. Looping Over a Query Result Set
      8. 4.8. Formatting Techniques
        1. 4.8.1. Formatting Plain-Text Strings
          1. 4.8.1.1. Using ParagraphFormat
          2. 4.8.1.2. Wrapping text
          3. 4.8.1.3. Changing case
          4. 4.8.1.4. Making strings JavaScript-safe
          5. 4.8.1.5. Making strings safe for XML
        2. 4.8.2. Formatting HTML
          1. 4.8.2.1. HTMLCodeFormat
          2. 4.8.2.2. HTMLEditFormat
        3. 4.8.3. Formatting Numbers
          1. 4.8.3.1. Formatting decimal numbers
          2. 4.8.3.2. General number formatting
          3. 4.8.3.3. Locale-specific number formatting
        4. 4.8.4. Formatting Currency Values
          1. 4.8.4.1. Formatting dollars
          2. 4.8.4.2. Locale-specific currency formatting
          3. 4.8.4.3. Locale-specific currency formatting with the euro
        5. 4.8.5. Formatting Boolean Values
        6. 4.8.6. Formatting Dates and Times
          1. 4.8.6.1. General date formatting
          2. 4.8.6.2. Locale-specific date formatting
          3. 4.8.6.3. General time formatting
          4. 4.8.6.4. Locale-specific time formatting
    9. 5. Maintaining Database Records
      1. 5.1. Inserting Records
        1. 5.1.1. Inputting Data Via Forms
        2. 5.1.2. Inserting Form-Field Data
          1. 5.1.2.1. Inserting a record using cfquery
          2. 5.1.2.2. Inserting a record using cfinsert
      2. 5.2. Updating Existing Records
        1. 5.2.1. Choosing a Record to Update
        2. 5.2.2. Dynamically Populating Update Forms
        3. 5.2.3. Performing the Database Update
          1. 5.2.3.1. Updating a record using cfquery
          2. 5.2.3.2. Updating a record using cfupdate
        4. 5.2.4. Dynamically Populating Additional Form-Field Types
          1. 5.2.4.1. Populating text areas
          2. 5.2.4.2. Populating select lists
          3. 5.2.4.3. Generating and selecting multiple checkboxes
          4. 5.2.4.4. Generating and selecting radio buttons
      3. 5.3. Deleting Records
        1. 5.3.1. Deleting a Single Record
        2. 5.3.2. Deleting Multiple Records
        3. 5.3.3. Asking for Confirmation Before Deleting
        4. 5.3.4. A Note About Referential Integrity and Cascading Deletes
    10. 6. Complex Datatypes
      1. 6.1. Lists
        1. 6.1.1. Looping over a List
        2. 6.1.2. Manipulating Lists
      2. 6.2. Arrays
        1. 6.2.1. Initializing an Array
        2. 6.2.2. Adding Data to an Array
        3. 6.2.3. Manipulating Array Elements
      3. 6.3. Structures
        1. 6.3.1. Creating a Structure
        2. 6.3.2. Populating a Structure with Data
        3. 6.3.3. Using a Collection Loop to Loop over the Contents of a Structure
        4. 6.3.4. Creating an Array of Structures
        5. 6.3.5. Manipulating Structures
      4. 6.4. Query Objects
        1. 6.4.1. Manipulating Query Objects
    11. 7. Maintaining State
      1. 7.1. Setting Up the Web Application Framework
        1. 7.1.1. The Application.cfm File
        2. 7.1.2. The OnRequestEnd.cfm File
      2. 7.2. Using Shared Scope Variables
        1. 7.2.1. Locking
          1. 7.2.1.1. Locking shared scope variables at the scope level
          2. 7.2.1.2. Locking shared scope variable access using named locks
          3. 7.2.1.3. Locking access to nonthread-safe objects and file operations
          4. 7.2.1.4. Additional locking considerations
        2. 7.2.2. Application Variables
        3. 7.2.3. Client Variables
          1. 7.2.3.1. Client-variable storage options
          2. 7.2.3.2. Creating an external data source for client variable storage
          3. 7.2.3.3. Using client variables without cookies
          4. 7.2.3.4. Storing complex datatypes in client variables
          5. 7.2.3.5. Client variables and clustering
          6. 7.2.3.6. Deleting client variables
        4. 7.2.4. Cookies
          1. 7.2.4.1. Setting cookies
          2. 7.2.4.2. Retrieving cookies
          3. 7.2.4.3. Deleting cookies
        5. 7.2.5. Session Variables
          1. 7.2.5.1. Using session variables without cookies
          2. 7.2.5.2. Deleting session variables
          3. 7.2.5.3. Session variables and clustering
        6. 7.2.6. Server Variables
      3. 7.3. Browser Redirection
      4. 7.4. Portal Example
        1. 7.4.1. Web Application Framework
        2. 7.4.2. Main Template
        3. 7.4.3. Customization
    12. 8. Security
      1. 8.1. Security Basics
      2. 8.2. Implementing Security from Scratch
        1. 8.2.1. Creating a Simple Security Table in the Database
        2. 8.2.2. Setting Up the Application.cfm Template
        3. 8.2.3. Creating Login and Registration Screens
        4. 8.2.4. Authenticating Users
        5. 8.2.5. Securing Non-CFML Files
        6. 8.2.6. Levels of Access
      3. 8.3. Taking Advantage of ColdFusion MX’s New Security Framework
        1. 8.3.1. Authenticating Users
          1. 8.3.1.1. Application-based authentication
          2. 8.3.1.2. HTTP authentication
        2. 8.3.2. Role-Based Permissions
    13. 9. Error and Exception Handling
      1. 9.1. Basic Exception Handling
      2. 9.2. Custom Exception Handling
      3. 9.3. Rethrowing Exceptions
      4. 9.4. Error Handling Within the Web-Application Framework
        1. 9.4.1. Form Validation Errors
        2. 9.4.2. Request Errors
        3. 9.4.3. Specific Exceptions
        4. 9.4.4. Monitors (ColdFusion 5 Only)
        5. 9.4.5. Exception Logging
      5. 9.5. Server-Wide Error Handling
        1. 9.5.1. Missing Template Handler
        2. 9.5.2. Site-wide Error Handler
    14. 10. Dynamic Form Controls
      1. 10.1. Combining HTML and CFML Form Controls
      2. 10.2. Basic Input Controls
        1. 10.2.1. Data Validation
        2. 10.2.2. Data Validation with JavaScript Regular Expressions
      3. 10.3. Textual Input
      4. 10.4. A Selection Control
      5. 10.5. Sliders
      6. 10.6. Grids
        1. 10.6.1. Customizing Column Data
        2. 10.6.2. Specifying Row Data
        3. 10.6.3. Creating Updateable Grids
          1. 10.6.3.1. Updating a grid using cfgridupdate
          2. 10.6.3.2. Updating a grid using cfquery
          3. 10.6.3.3. Advanced editable grid controls
      7. 10.7. Trees
        1. 10.7.1. Populating a Tree Control
          1. 10.7.1.1. Creating a static tree
          2. 10.7.1.2. Dynamically populating a tree control with query data
        2. 10.7.2. Submitting a Tree Selection
        3. 10.7.3. Creating a Tree Via Recursion
      8. 10.8. Preserving Input
      9. 10.9. Custom Controls
    15. 11. Advanced Database Techniques
      1. 11.1. Display Techniques
        1. 11.1.1. Flushing Page Output
        2. 11.1.2. Displaying Limited Record Sets
        3. 11.1.3. Alternating Row Color in HTML Tables
        4. 11.1.4. Multicolumn Output
          1. 11.1.4.1. Sorting multicolumn output from left to right
          2. 11.1.4.2. Sorting multicolumn output from top to bottom
        5. 11.1.5. Next/Previous Record Browsing
        6. 11.1.6. Controlling Whitespace
          1. 11.1.6.1. Optimizing output
          2. 11.1.6.2. Suppressing output
          3. 11.1.6.3. Suppressing whitespace
      2. 11.2. Drilldown Queries
      3. 11.3. Query Caching
      4. 11.4. Advanced SQL
        1. 11.4.1. Dynamic SQL
        2. 11.4.2. Creating and Modifying Tables
          1. 11.4.2.1. Creating new tables
          2. 11.4.2.2. Populating new tables with existing data
          3. 11.4.2.3. Altering table design
          4. 11.4.2.4. Deleting tables
        3. 11.4.3. Retrieving Unique Values
        4. 11.4.4. Using Column Aliases
        5. 11.4.5. Scalar Functions
        6. 11.4.6. Aggregate Functions
        7. 11.4.7. Subqueries
        8. 11.4.8. Unions
        9. 11.4.9. Joins
          1. 11.4.9.1. Inner joins
          2. 11.4.9.2. Outer joins
        10. 11.4.10. Data Binding and Preventing Malicious Query Code
      5. 11.5. Query of Queries
      6. 11.6. Calling Stored Procedures
        1. 11.6.1. Using cfstoredproc
          1. 11.6.1.1. Passing parameters using cfprocparam
          2. 11.6.1.2. Specifying result sets using cfprocresult
        2. 11.6.2. Using cfquery
      7. 11.7. Transaction Processing
    16. 12. Manipulating Files and Directories
      1. 12.1. Working with Directories
        1. 12.1.1. Listing Directory Contents
        2. 12.1.2. Creating a Directory
        3. 12.1.3. Renaming a Directory
        4. 12.1.4. Deleting a Directory
      2. 12.2. Dealing with Files
        1. 12.2.1. Uploading Files
        2. 12.2.2. Renaming Files
        3. 12.2.3. Moving Files
        4. 12.2.4. Copying Files
        5. 12.2.5. Deleting Files
        6. 12.2.6. Reading Text Files
        7. 12.2.7. Reading Binary Files
        8. 12.2.8. Writing Text Files
        9. 12.2.9. Writing Binary Files
        10. 12.2.10. Appending Text Files
      3. 12.3. Performing FTP Operations
        1. 12.3.1. Connecting to a Remote Server
        2. 12.3.2. Automatically Opening a Connection
        3. 12.3.3. Closing the Connection
        4. 12.3.4. Performing File and Directory Operations
          1. 12.3.4.1. Obtaining a directory listing
          2. 12.3.4.2. Uploading files
          3. 12.3.4.3. Downloading files
          4. 12.3.4.4. Deleting files
      4. 12.4. Executing Command-Line Programs
    17. 13. Working with Email
      1. 13.1. Sending Email
        1. 13.1.1. Sending HTML Mail
        2. 13.1.2. Sending Multi-Part Messages
        3. 13.1.3. Emailing Form Contents
        4. 13.1.4. Adding Query Results to Email
        5. 13.1.5. Including Grouped Query Results
        6. 13.1.6. Sending Customized Email to Multiple Recipients
        7. 13.1.7. Sending File Attachments
        8. 13.1.8. Specifying Additional Header Information
      2. 13.2. Dealing with Undeliverable Email
      3. 13.3. Retrieving Messages
        1. 13.3.1. Retrieving Message Headers
        2. 13.3.2. Retrieving Message Contents
        3. 13.3.3. Dealing with Attachments
        4. 13.3.4. Deleting Messages
      4. 13.4. Building a Web-Based Email Client
        1. 13.4.1. Moving Beyond a Basic Email Client
    18. 14. Interacting with Other Web Servers Using HTTP
      1. 14.1. Retrieving Information
        1. 14.1.1. Saving Information to a Variable
        2. 14.1.2. Saving Information to a File
        3. 14.1.3. Retrieving HTTP Header Information
        4. 14.1.4. Creating Query Objects from Text Files
        5. 14.1.5. Passing Parameters
      2. 14.2. Parsing Data
      3. 14.3. Generating Static HTML Pages
      4. 14.4. Posting Information
        1. 14.4.1. Sending Form-Field Data
        2. 14.4.2. Sending URL Variables
        3. 14.4.3. Sending CGI Variables
        4. 14.4.4. Sending Cookies
        5. 14.4.5. Sending Files
        6. 14.4.6. Sending XML
        7. 14.4.7. Sending Header and Body Content
      5. 14.5. cfhttp Considerations
        1. 14.5.1. JRE-Related Issues in ColdFusion MX
        2. 14.5.2. Authentication
    19. 15. Interfacing with LDAP-Enabled Directories
      1. 15.1. LDAP Basics
        1. 15.1.1. LDAP Attributes
        2. 15.1.2. Public LDAP Servers
      2. 15.2. Querying an LDAP Directory
        1. 15.2.1. Performing an LDAP Query
        2. 15.2.2. Obtaining the LDAP Server Schema
      3. 15.3. Modifying LDAP Entries
        1. 15.3.1. Adding/Updating Entries
        2. 15.3.2. Deleting Entries
      4. 15.4. Modifying the Distinguished Name
    20. 16. Working with the Verity Search Interface
      1. 16.1. Creating Collections
        1. 16.1.1. Creating Collections with the ColdFusion Administrator
        2. 16.1.2. Creating Collections with the cfcollection Tag
      2. 16.2. Populating Collections
        1. 16.2.1. Indexing Files
          1. 16.2.1.1. Indexing files with the ColdFusion Administrator
          2. 16.2.1.2. Indexing files programmatically with cfindex
        2. 16.2.2. Indexing Query Results
          1. 16.2.2.1. Indexing database query results
          2. 16.2.2.2. Indexing cfldap query results
          3. 16.2.2.3. Indexing cfpop query results
      3. 16.3. Searching Collections
        1. 16.3.1. Building a Search Interface
          1. 16.3.1.1. Searching file collections
          2. 16.3.1.2. Searching database collections
      4. 16.4. The Verity Search Language
        1. 16.4.1. Simple Versus Explicit Searches
          1. 16.4.1.1. Operators
            1. 16.4.1.1.1. Order of evaluation
            2. 16.4.1.1.2. Prefix and infix notation
            3. 16.4.1.1.3. Quotation marks
            4. 16.4.1.1.4. Special characters
            5. 16.4.1.1.5. Concept operators
            6. 16.4.1.1.6. Evidence operators
            7. 16.4.1.1.7. Proximity operators
            8. 16.4.1.1.8. Relational operators
            9. 16.4.1.1.9. Score operators
            10. 16.4.1.1.10. Modifiers
        2. 16.4.2. Building an Advanced Search Interface
      5. 16.5. Updating Collections
        1. 16.5.1. Adding New Records to a Collection
        2. 16.5.2. Deleting Records from a Collection
      6. 16.6. Maintaining Collections
        1. 16.6.1. Optimizing Collections
        2. 16.6.2. Repairing Collections
        3. 16.6.3. Purging Collections
        4. 16.6.4. Deleting Collections
      7. 16.7. Advanced Techniques
        1. 16.7.1. Creating a Top-Ten List
        2. 16.7.2. Custom Attributes
          1. 16.7.2.1. Populating the custom attributes
          2. 16.7.2.2. Searching the custom attributes
          3. 16.7.2.3. Extending the usefulness of custom attributes
        3. 16.7.3. Modifying the Verity Summary Attribute
        4. 16.7.4. Tweaking Verity’s XML Filter
        5. 16.7.5. Searching Database and Document Collections Simultaneously
    21. 17. Graphing and Charting
      1. 17.1. Creating a Simple Graph
      2. 17.2. Working with Dates
      3. 17.3. Charting Dynamic Data
      4. 17.4. Charting Multiple Data Series
        1. 17.4.1. Multiple Data Point Colors in a Single Series
      5. 17.5. Drilling Down on Graph Data
        1. 17.5.1. Passing Chart Parameters to JavaScript
      6. 17.6. Saving Charts to a Variable
      7. 17.7. Working with the Chart Cache
    22. 18. Regular Expressions in ColdFusion
      1. 18.1. Regular-Expression Syntax
        1. 18.1.1. Commenting Regular Expressions
        2. 18.1.2. Operators
        3. 18.1.3. POSIX Classes
        4. 18.1.4. Character Classes
        5. 18.1.5. Unsupported Perl Regular-Expression Conventions
      2. 18.2. Finding Strings
        1. 18.2.1. Maximal Versus Minimal Matching
      3. 18.3. Replacing Strings
      4. 18.4. Backreferences
        1. 18.4.1. Replacement String Case Conversion
        2. 18.4.2. Excluding Subexpressions from Backreferences
      5. 18.5. Useful Regular Expressions
      6. 18.6. Regular Expression Tester
    23. 19. Scripting
      1. 19.1. Scripting Syntax
        1. 19.1.1. Working with Variables
        2. 19.1.2. Commenting Your Code
      2. 19.2. Writing Output
      3. 19.3. Flow Control and Looping
        1. 19.3.1. if/else
        2. 19.3.2. switch/case
        3. 19.3.3. for Loops
        4. 19.3.4. for/in Loops
        5. 19.3.5. while Loops
        6. 19.3.6. do/while Loops
        7. 19.3.7. Using break Within a Loop
        8. 19.3.8. Using continue
      4. 19.4. Error and Exception Handling
    24. 20. User-Defined Functions
      1. 20.1. UDF Basics
        1. 20.1.1. Function Arguments in Tag-Based UDFs
        2. 20.1.2. Local Function Variables (The Function Scope)
        3. 20.1.3. Returning Data from a Function
      2. 20.2. Calling User-Defined Functions
        1. 20.2.1. A Note About Datatypes
      3. 20.3. Advanced Topics
        1. 20.3.1. Recursion
        2. 20.3.2. Error and Exception Handling
        3. 20.3.3. Assigning UDFs to Other Variable Scopes
        4. 20.3.4. UDFs and Custom Tags
      4. 20.4. Function Libraries
      5. 20.5. Script-Based UDFs
    25. 21. Creating Custom Tags
      1. 21.1. Getting Started
        1. 21.1.1. Why Custom Tags?
        2. 21.1.2. Custom Tags Versus Other Options
      2. 21.2. Calling Custom Tags
      3. 21.3. Passing Data
      4. 21.4. Returning Data
        1. 21.4.1. Returning Multiple Values from a Custom Tag
      5. 21.5. Attribute Validation and Error Handling
        1. 21.5.1. Handling Required Attributes
        2. 21.5.2. Handling Optional Attributes
        3. 21.5.3. Validating Datatypes
        4. 21.5.4. Error and Exception Handling
      6. 21.6. Advanced Techniques
        1. 21.6.1. Calling Custom Tags Via cfmodule
        2. 21.6.2. Importing Custom Tags as a Tag Library
          1. 21.6.2.1. A noteworthy cfimport bug
        3. 21.6.3. Adaptive Tags
        4. 21.6.4. Passing Attributes via Structures
        5. 21.6.5. Creating Tag Pairs
        6. 21.6.6. Nesting Custom Tags
          1. 21.6.6.1. Extending cf_sitewrapper with child tags
        7. 21.6.7. Aborting Tag Processing
      7. 21.7. Protecting Your Tags
      8. 21.8. CFX Tags
        1. 21.8.1. Registering CFX Tags
          1. 21.8.1.1. Registering C++ CFX tags
          2. 21.8.1.2. Registering Java CFX tags
        2. 21.8.2. Calling CFX Tags
        3. 21.8.3. Additional Resources
    26. 22. ColdFusion Components
      1. 22.1. Basic Concepts
      2. 22.2. Creating Components
        1. 22.2.1. Adding Metadata to Components
        2. 22.2.2. Component Methods
          1. 22.2.2.1. Method arguments
          2. 22.2.2.2. Returning data from methods
          3. 22.2.2.3. Method includes
        3. 22.2.3. Variable Scope in CFCs
        4. 22.2.4. Saving Components
      3. 22.3. Using Components
        1. 22.3.1. Using cfinvoke
        2. 22.3.2. Using cfobject and createObject( )
        3. 22.3.3. Calling a CFC Method Via URL
        4. 22.3.4. Calling a CFC Method Via Form Post
      4. 22.4. Advanced CFC Topics
        1. 22.4.1. Introspection
        2. 22.4.2. Inheritance
          1. 22.4.2.1. Global component inheritance with component.cfc
        3. 22.4.3. Component Security
          1. 22.4.3.1. Securing access using HTTP Basic Authentication
          2. 22.4.3.2. Securing access using ColdFusion’s built-in security framework
        4. 22.4.4. Assigning Component Instances to Shared Variable Scopes
    27. 23. XML and WDDX
      1. 23.1. Working with XML
        1. 23.1.1. A 30-Second XML Primer
        2. 23.1.2. XML Document Object
        3. 23.1.3. XML DOM Nodes
        4. 23.1.4. Generating Your Own XML
        5. 23.1.5. Matching XML Data with XPath
        6. 23.1.6. Transforming XML with XSLT
      2. 23.2. Using WDDX
        1. 23.2.1. What Can You Do with WDDX?
        2. 23.2.2. How Does It Work?
        3. 23.2.3. Show Me the WDDX!
        4. 23.2.4. Serializing and Deserializing Data
          1. 23.2.4.1. Serializing and deserializing simple values
          2. 23.2.4.2. Datatype conversion issues
          3. 23.2.4.3. Testing for well-formed WDDX
          4. 23.2.4.4. Serializing and deserializing complex datatypes
            1. 23.2.4.4.1. Record sets
            2. 23.2.4.4.2. Arrays
            3. 23.2.4.4.3. Structures
            4. 23.2.4.4.4. Binary data
        5. 23.2.5. Storing WDDX Packets
          1. 23.2.5.1. Storing packets in a text file
          2. 23.2.5.2. Storing packets in a database
        6. 23.2.6. Server-to-Browser WDDX Using JavaScript
          1. 23.2.6.1. Passing data to JavaScript on the browser
          2. 23.2.6.2. Simplifying the process
          3. 23.2.6.3. Passing data from JavaScript to ColdFusion
    28. 24. Web Services
      1. 24.1. Web Services Overview
      2. 24.2. Consuming Web Services
        1. 24.2.1. Registering Web Services in the ColdFusion Administrator
        2. 24.2.2. Consuming a ColdFusion MX Web Service
        3. 24.2.3. Dealing with Complex Datatypes
          1. 24.2.3.1. Complex types as return values
          2. 24.2.3.2. Complex types as input parameters
      3. 24.3. Producing Web Services
        1. 24.3.1. Handling Datatype Mapping in ColdFusion-Produced Web Services
        2. 24.3.2. Creating Custom Datatypes
      4. 24.4. Web Services Security
        1. 24.4.1. Securing Access Using HTTP Basic Authentication
        2. 24.4.2. Securing Access Using ColdFusion’s Built-in Security Framework
    29. 25. Working with the System Registry
      1. 25.1. Getting Registry Keys and Values
      2. 25.2. Setting Registry Keys and Values
      3. 25.3. Deleting Registry Keys and Values
    30. 26. Using the ColdFusion Scheduler
      1. 26.1. Scheduling Tasks with the ColdFusion Administrator
        1. 26.1.1. Logging Scheduled Tasks
        2. 26.1.2. Adding a Task
        3. 26.1.3. Manually Executing a Task
        4. 26.1.4. Updating and Deleting Tasks
          1. 26.1.4.1. Updating a task
          2. 26.1.4.2. Deleting a task
      2. 26.2. Scheduling Tasks with cfschedule
        1. 26.2.1. Adding Tasks
        2. 26.2.2. Updating Tasks
        3. 26.2.3. Deleting a Task
        4. 26.2.4. Running Tasks
      3. 26.3. Additional Considerations
    31. 27. Interacting with COM, CORBA, and Java
      1. 27.1. Working with COM
      2. 27.2. Calling CORBA Objects
      3. 27.3. Integrating ColdFusion and Java
        1. 27.3.1. Calling Java Objects
          1. 27.3.1.1. Overloading methods
          2. 27.3.1.2. Handling exceptions
          3. 27.3.1.3. The Java API
          4. 27.3.1.4. Taking advantage of the PageContext object
        2. 27.3.2. Communicating with Servlets and JSP Pages
          1. 27.3.2.1. Sharing data between ColdFusion and servlets/JSP pages
        3. 27.3.3. Using JSP Tags and Tag Libraries
    32. 28. Flash Remoting
      1. 28.1. Getting Started with Flash Remoting for ColdFusion MX
        1. 28.1.1. Setting Up Flash Remoting
        2. 28.1.2. Working with the Flash MX Editor
        3. 28.1.3. Writing ActionScript for Flash Remoting
      2. 28.2. Interacting with ColdFusion Pages
      3. 28.3. Interacting with ColdFusion Components
        1. 28.3.1. Introspecting CFCs in Flash MX
        2. 28.3.2. Securing Flash Remoting Applications
      4. 28.4. Interacting with Server-Side ActionScript
      5. 28.5. Flash Remoting with Java Objects Hosted on the ColdFusion MX Server
    33. A. Tag Reference
      1. A.1. Tags by Type
        1. A.1.1. Custom Tag Tags
        2. A.1.2. Database Tags
        3. A.1.3. Error, Exception-Handling, and Debugging Tags
        4. A.1.4. Extensibility Tags
        5. A.1.5. Filesystem Tags
        6. A.1.6. Flow Control Tags
        7. A.1.7. Form Tags
        8. A.1.8. Miscellaneous Tags
        9. A.1.9. Output Tags
        10. A.1.10. Protocol Tags
        11. A.1.11. Security Tags
        12. A.1.12. System Tags
        13. A.1.13. UDFs/CFCs/Web Services Tags
        14. A.1.14. Variable Manipulation Tags
        15. A.1.15. Verity Search Engine Tags
      2. A.2. Alphabetical List of Tags
    34. B. Function Reference
      1. B.1. Functions by Category
        1. B.1.1. Array Functions
        2. B.1.2. Date/Time Functions
        3. B.1.3. Decision/Evaluation Functions
        4. B.1.4. Encoding/Encryption Functions
        5. B.1.5. File/Directory Functions
        6. B.1.6. Formatting Functions
        7. B.1.7. Internationalization/Localization Functions
        8. B.1.8. List Functions
        9. B.1.9. Mathematical Functions
        10. B.1.10. Miscellaneous Functions
        11. B.1.11. Query Functions
        12. B.1.12. Security Functions
        13. B.1.13. String Functions
        14. B.1.14. Structure Functions
        15. B.1.15. Undocumented Functions
        16. B.1.16. Verity Functions
        17. B.1.17. XML Functions
      2. B.2. Alphabetical List of Functions
    35. C. Example Database Tables
    36. D. ColdFusion Resources
      1. D.1. Official Macromedia Resources
      2. D.2. Magazines
      3. D.3. Mailing Lists
      4. D.4. Blogs
      5. D.5. Community Resources
      6. D.6. User Groups
    37. About the Author
    38. Colophon
    39. Special Upgrade Offer
    40. Copyright