wood burning stoves 2.0*
The moose likes JSP and the fly likes Accessing scoped variables using EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Accessing scoped variables using EL" Watch "Accessing scoped variables using EL" New topic
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: 14687
    
  16

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: 14687
    
  16

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing scoped variables using EL
 
Similar Threads
Export to Excel Dialog Box Always Pops Up
El doubt
Doubt in EL's sequence
how to pass parameters between servlet
Problem using Expression language in JSP page (java code)