This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSF and the fly likes jsf bean instance in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "jsf bean instance in servlet" Watch "jsf bean instance in servlet" New topic
Author

jsf bean instance in servlet

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
hi all,

how to get jsf bean instance in servlet.

thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033
    
  26

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")".


An IDE is no substitute for an Intelligent Developer.
Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
hi tim

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

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

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsf bean instance in servlet
 
It's not a secret anymore!