• Post Reply Bookmark Topic Watch Topic
  • New Topic

regarding attributes

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
someone has set an attribute in one jsp page and i do not know,in which scope he has set the attribute.Now,i want to access that attribute,i mean ,if i do not know the scope of the attribute,how will i access that attribute.Please tell me how we can do this.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JSP 1.2, you would have to either have access to that persons code or, check in all three scoped objects for it.

In JSP 2.0, the JSP expression language (EL) does this for you.
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben,
can you let me know with an example,how EL solves this issue.As far as i know,EL also involves requestScope,sessionScope etc. elements.So how does that solve our problem.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the EL, if you do not specify a specific scope, all scopes are searched for the scoped variable.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!