-1

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.

Leigh
  • 28,765
  • 10
  • 55
  • 103
Rollerball
  • 12,618
  • 23
  • 92
  • 161
  • There's two valid reasons for closing this: a) there's a very similar question (linked to below) on Stack Overflow already; b) it doesn't show sufficient "own research". I've voted to close for the former reason. – Adam Cameron Jan 04 '14 at 17:02
  • @AdamCameron you right, I voted to close myself. – Rollerball Jan 05 '14 at 10:14

1 Answers1

5

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.

Community
  • 1
  • 1
Adam Cameron
  • 29,677
  • 4
  • 37
  • 78