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

Using onMissingTemplate

The new method that we’ll be adding to our Application.cfc file is the onMissingTemplate function. This method is passed one argument: the name of the script that was requested. Listing 19.13 shows the latest version of the Application.cfc file. Be sure to save this file as Application.cfc, not Application7.cfc.

Listing 19.13. Application7.cfc—Working with onMissingTemplate
<!--- Filename: Application.cfc (The "Application Component") Created by: Raymond Camden (ray@camdenfamily.com) Purpose: Sets "constant" variables and includes consistent header ---> <cfcomponent output="false"> <cfset THIS.name = "ows19"> <cferror type="Request" template="ErrorRequest.cfm" mailto="webmaster@orangewhipstudios.com"> <cferror type="Exception" ...

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