sessionscope « Bean « JSF Q&A

1. How can i get a SessionScope Object in my Bean

i search a way how i can access a class in the sessionscope. I have this class:

public class UserManagerBean implements Serializable{...}
and i will access some fields from a other bean. How can ...

2. Handling user session in jsf 2

I'm building a web application using jsf2. I use a @ManagedBean with a @SessionScope. In it I store the username etc in a User object. Let's say I want to create an ...

3. Why should we make a SessionScoped ManagedBean thread safe in JSF?

I know that Application-Scope persists across multiple users, so it's obvious that we should make sure that all the ApplicationScoped ManagedBeans are thread safe. I also understand that we don't need to ...

4. In jsf, can i inject a sessionscope bean into an actionlistener?

In jsf, I want to inject a sessionscope bean into an actionlistener implementation. Can it be done?

5. CDI SessionScoped Bean generating lots of sessions

I'm doing a login. The problem is: my isUserLoggedIn() method is called several times by other sessions (i've checked using (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false)). The Login bean (of a JSF page) is this:

public class ...

6. JSF 2: possible to initialize session-scoped beans on session start?

Is it possible in JSF 2 to initialize a session-scoped managed bean as soon as the session context is loaded? I know it's possible with Application Scoped beans and the eager ...