nam
nam

Reputation: 23753

Coldfusion: form.fieldname and session.fieldname

I'm a new comer to ColdFusion and am trying to convert CF web app to ASP.NET web app. We've Index.cfm file and a template Manage.cfm file. If a user clicks on a link in Index.cfm it opens a URL with something like http://localhost/index.cfm?t=Manage.cfm. The template Manage.cfm is using a message <p>Year of Completion is : <cfoutput>#session.YearOfCompletion#</cfoutput>

But neither in Index.cfm nor in Manage.cfm I see a place where session.YearOfCompletion or form.YearOfCompletion value is set. Question: How then template is getting #session.YearOfCompletion# value in the output? It seems I'm missing something.

Upvotes: 0

Views: 87

Answers (1)

Leeish
Leeish

Reputation: 5213

It's common for developers to init a ColdFusion application and a common place to start looking is in the application.cfc(.cfm) file in the application folder. Developers may do things differently, but for session variables especially, there is a default function called onSessionStart which fires once for each new user session.

Most likely it is in that function default values are being set for the session variables. Other locations may be from componenets created and initiated from within the onRequest onRequestStart or onSessionStart functions.

Upvotes: 4

Related Questions