can a variable with same name present in more than one scope?
Joined: Apr 13, 2004
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?
Joined: Dec 16, 2003
My guess is YES, but should be in a different scope.
Joined: Nov 20, 2000
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.