• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL and expression

 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • 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.
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • 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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic