Mid-Page ColdFusion Session Expiration Behavior

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>ColdFusion Session Timeout Test</title>
</head>
<body>
 
	<h1>
		2 Second ColdFusion Session Timeout Test
	</h1>
 
	<!---
		Pause the thread for longer than the session
		should run for. By doing this, it means that the
		session should timeout during the process.
	--->
	<cfthread
		action="sleep"
		duration="#(10 * 1000)#"
		/>
 
 
	<p>
		Session Created:
 
		#TimeFormat(
			SESSION.DateCreated,
			"hh:mm:ss"
			)#
	</p>
 
	<!--- Check to see if the session has been ended. --->
	<cfif StructKeyExists( SESSION, "DateEnded" )>
 
		<p>
			Session Ended:
 
			#TimeFormat(
				SESSION.DateEnded,
				"hh:mm:ss"
				)#
		</p>
 
	</cfif>
 
	<p>
		Page Ended:
 
		#TimeFormat(
			Now(),
			"hh:mm:ss"
			)#
	</p>
 
</body>
</html>

For Cut-and-Paste