O'Reilly logo

ColdFusion 8 Developer Tutorial by John Farrar

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

Setting Page Defaults

The information that you will obtain from here can be applied to more than page defaults. This is the most common place where you should use it. We will make a minor change in the code while creating a new page. We will use the<cfparam> tag to set the default values in the following code:

<!--- Example: 1_12.cfm --->
<!--- Processing --->
<cfparam name="url.name" default="( unknown user )">
<!--- Content --->
<cftry>
<cfoutput>
My name is #url.name#.<br />
</cfoutput>
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
Setting Page Defaults

Now, we have learned how to catch and handle exceptions. We have also learned how to solve such types of ...

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