| Author |
can a variable with same name present in more than one scope?
|
yamini nadella
Ranch Hand
Joined: Apr 13, 2004
Posts: 257
|
|
can a variable with same name present in more than one scope? assume first I declared a variable in page scope and then I declared the same variable in application scope then what happens?
|
 |
arnel nicolas
Ranch Hand
Joined: Dec 16, 2003
Posts: 149
|
|
My guess is YES, but should be in a different scope. arnel
|
 |
Ashish Sarin
author
Ranch Hand
Joined: Nov 20, 2000
Posts: 403
|
|
|
Yes it is possible. But it is recommended that you try not to have variables with same name in different scopes. If you do have such a case in which variable with the same name is present in lets say, page and session scopes then when the EL expression is used which requires rearching the various scopes then it will return the variable in the scope which was searched first ie. page.
|
Author of
Getting started with Spring Framework
Portlets in Action
Spring Roo 1.1 Cookbook
Portlets blog – Spring Roo blog
|
 |
 |
|
|
subject: can a variable with same name present in more than one scope?
|
|
|