Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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
Pie
Posts: 17995
47
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