• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EL and expression

 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


In EmpBean default value for name is "SomeUser" so i see the following output :::::::::::
SomeUser
---Blank--

${ee.name} does not return any value because ee is not an attribute or map but simply a local variable. Which is OK. But what if I want to set ee as a page scope attribute ? How does one achieve doing that so that I can access ee object from EL ??


Thanks,
Shivani.
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want the object to reside in a page-scoped attribute called "ee" (so it can be accessed from EL), you would need to do:either in your existing scriplet code or in a new scriplet before you use the EL statement.

Alternatively, you could just use the following EL code, since the object is already stored in the page-scope "emp" attribute:
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic