• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to access session variable in the jsf page  RSS feed

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body I have one question related to session scoped variable.

I have declaired one session scoped variable on my backing bean like this way :



How could I access that mySession variable on my jsf page ?
I know I can access by <%session.getAttribute("mySession")%> , but I want to use only JSF code here.

Please help me out.

thanks and regards,
S.
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should just be able to reference it in EL:


<hutputText value="#{mySession.propertyx}"/>


The only difference between JSF managed session objects and non-managed session objects is that JSF will use the declarations in faces-config to construct and initialize the managed objects.
 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply


S.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!