| Author |
Accessing scoped variables using EL
|
Vinod Awar
Ranch Hand
Joined: Nov 06, 2006
Posts: 125
|
|
Hii ranchers, Iam learning EL.iam trying my hand at some sample code.In servlet iam setting attributes in different scopes. and then in a jsp page i try to access these attributes using EL.Here is my servlet code and jsp page now how can i access all values of the attribute repeated. Thanks,
|
The biggest bankruptcy is the loss of enthusiasm
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
You can access the different scopes via the following implicit objects: pageScope, requestScope, sessionScope, applicationScope.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Vinod Awar
Ranch Hand
Joined: Nov 06, 2006
Posts: 125
|
|
Thanks Satou kurinosuke I tried that and it works. But does that mean web designers are supposed to know the scope of attributes they are trying to access.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
Better say that you usually put a variable in only one scope, to avoid troubles. Putting the same variable in different scope is asking for troubles
|
 |
Vinod Awar
Ranch Hand
Joined: Nov 06, 2006
Posts: 125
|
|
|
Thank you
|
 |
 |
|
|
subject: Accessing scoped variables using EL
|
|
|