Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
<cfcomponent output="false">
<cffunction name="onRequestStart" returntype="boolean" output="yes">
<!--- Any variables set here can be used by all our pages --->
<!--- <CFSET request.dataSource = "enroll">--->
<CFSET request.dsn = "test1`">
<CFSET request.dsn2 = "test2">
<CFSET request.companyName = "My Test">
<CFSET ErrorEmail = "cpersone@purdue.edu">
<cfreturn true>
</cffunction>
<!--- Name our application, and enable Application variables --->
<cfset THIS.name = "MyTest">
<cfset THIS.sessionmanagement ="yes">
<!--- Display Custom Message for "Request" Errors --->
<CFERROR TYPE="Request" TEMPLATE="ErrorRequest.cfm" MAILTO="cpersone@purdue.edu">
<!--- Display Custom Message for "Exception" Errors --->
<CFERROR TYPE="Exception" EXCEPTION="Any" TEMPLATE="ErrorException.cfm" MAILTO="cpersone@purdue.edu">
<!--- Display Custom Message for "Validation" Errors --->
<CFERROR TYPE="Validation" TEMPLATE="ErrorValidation.cfm">
<cffunction name="onMissingTemplate" returntype="boolean" output="no">
<cfargument name="targetpage" type="string" required="yes">
<!---log it --->
<cflog file="#THIS.name#" text="Missing Templage: #arguments.targetpage#">
<cflocation url="CF Testing/404.cfm?missingtemplate=#urlEncodedFormat(agruments.targetpage)#" addtoken="no">
</cffunction>
</cfcomponent>
Copy link to clipboard
Copied
quote:
<cfcomponent output="false">
<cffunction name="onRequestStart" returntype="boolean" output="yes">
<!--- Any variables set here can be used by all our pages --->
<!--- <CFSET request.dataSource = "Test">--->
<CFSET request.dsn = "test1`">
<CFSET request.projectdsn= "test2">
<CFSET request.companyName = "My Test">
<CFSET ErrorEmail = "cpersone@purdue.edu">
<cfreturn true>
</cffunction>
<!--- Name our application, and enable Application variables --->
<cfset THIS.name = "MyTest">
<cfset THIS.sessionmanagement ="yes">
<!--- Display Custom Message for "Request" Errors --->
<CFERROR TYPE="Request" TEMPLATE="ErrorRequest.cfm" MAILTO="cpersone@purdue.edu">
<!--- Display Custom Message for "Exception" Errors --->
<CFERROR TYPE="Exception" EXCEPTION="Any" TEMPLATE="ErrorException.cfm" MAILTO="cpersone@purdue.edu">
<!--- Display Custom Message for "Validation" Errors --->
<CFERROR TYPE="Validation" TEMPLATE="ErrorValidation.cfm">
<cffunction name="onMissingTemplate" returntype="boolean" output="no">
<cfargument name="targetpage" type="string" required="yes">
<!---log it --->
<cflog file="#THIS.name#" text="Missing Templage: #arguments.targetpage#">
<cflocation url="CF Testing/404.cfm?missingtemplate=#urlEncodedFormat(agruments.targetpage)#" addtoken="no">
</cffunction>
</cfcomponent>
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: V.K.R
Hi
Please try the following line of code
<cfcomponent>
<cfparam name="application.error" default="0">
<cfset This.name = "testDSN">
<cfset This.Sessionmanagement="True">
<cfset This.loginstorage="session">
<cfset This.clientmanagement="True">
<cfset This.sessionTimeout=#CreateTimeSpan(0, 1, 0, 0)#>
<cffunction name="OnRequestStart">
<cfargument name = "request" required="true"/>
<cfset application.REQUEST.dsn="test_dsn1">
<cfset application.REQUEST.Reportdsn="test_dsn2">
<cfset application.REQUEST.Commondsn="test_dsn3">
</cffunction>
</cfcomponent>