Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf bean instance in servlet

 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

how to get jsf bean instance in servlet.

thanks in advance.
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the bean's scope. JSF beans are just ordinary session, request and application scope objects, you you'd gain access to them exactly the same as you would for non-JSF beans. For example, "session.getAttribute("myjsfbean")".
 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi tim

my jsf bean scop is session level and I tried this but not working

Bean searchBean = (Bean) request.getSession().getAttribute("bean");

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic