Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFJS: EL Evaluations Gone Wild.

 
Michael Vargenstien
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Back agian, reading HFJS for the 10th time, savorying every sentence, over analyzing, over complicating cause that how Sun rolls. So...question, I'm looking at the section "If it's NOT a string literal, it's evaluated" in scriptless JSPs on page 377 (2nd Ed).

Music is: ${musicMap[Ambient]}


Find an attribute named "Ambient". Use the VALUE of that attribute as the key into the Map, or return null.

The question is, if the Ambient attribute was bound to another scope, say session or servletContext/application, would the evaulation still work? Does it work simliar to pageContext.findAttribute("Ambient") and if it finds anything bound in ANY scope, it will evaulate it?

Any input much appreciated
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. No matter where a scoped variable is referenced in an EL expression, the discovery process is the same.
 
Michael Vargenstien
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bear!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic