Posts

Showing posts from April, 2009

ColdFusion All Scopes Local Variables using Java getPageContext() Method

Hi, You might have heard about CF's undocumented features. One of them came in really handy for me. Its the getPageContext() Method. Using this method, we can list all variable scopes. You could do something like this <cfdump var="#getPageContext().getVariableScope()#"> or <cfdump var="#getPageContext().getBuiltInScopes().Variables#"> to get local variables scope and similarly for other variable scope. I read about this method at 2 great blogs, one by Ben Nadel and other by Mark Kruger . http://www.bennadel.com/index.cfm?dax=blog:758.view http://www.coldfusionmuse.com/index.cfm/2008/7/29/get-all-scopes-for-a-request Hope this helps.