| Author |
EL to check session object how?
|
Davie Lin
Ranch Hand
Joined: Aug 05, 2007
Posts: 294
|
|
Hey everyone
If I have a User object and its store in session map like
What are the EL syntax I need to access the session object, in struts I use ${sessionScope}
Thanks
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
However, it's not recommended practice to name objects using an initial capital letter.
You can also reference using an explicit scope notation, but I've never needed to do that so far. Since it's also not advisable to name scoped objects with the same name in different scopes.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Davie Lin
Ranch Hand
Joined: Aug 05, 2007
Posts: 294
|
|
I believe I visited the official JSF site about EL syntax from oracle.
looks like JSF can use the same implicit object like sessionScope in JSP. That should be no problem if I am using Facelets instead right?
I will remember the naming convention you mentioned
Thanks Tim
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
|
Even in basic JSP, it was usually possible to omit the scope and have it determined implicitly. EL continues that tradition. While it may make the process of resolving objects slightly less efficient, since multiple scopes have to be searched, the payback is the flexibility of not having to change all your references if the scope needs to be changed.
|
 |
 |
|
|
subject: EL to check session object how?
|
|
|