Question

What is a real example of Request scope usage in ColdFusion?

From here:

Request The Request scope is used for the current request. These variables are non-persistent global variables.

Is it like the request object in JEE?

Thanks in advance.

Was it helpful?

Solution

I can't help but think you could have googled "ColdFusion request scope" and done some reading. There's plenty of already-written material on this:

Those were all from the first page of Google results.

it's all very well documented if you just choose to look for it, but the request scope is exposed to all CFML code executed as part of a request (so the mainline code, includes, custom tag code, CFC method code, <cfthread> code, etc), so if you need a variable available in all those contexts, then one can use the request scope. Contrast this with the variables scope which is only shared between the mainline code and included files, so not accessible within custom tag code, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top