I have a jsf web applicationand used javax.enterprise.context.SessionScoped beans for CDI beans and websphere server. I am assuming these beans will be added to httpsession and I could retrieve them to modify or utilized in other classes. But I could not get these beans from http session, they come as Null. If I change it to javax.faces.bean.SessionScoped, it is appearing in session attributes. How to retrieve javax.enterprise.context.SessionScoped beans from http session or is there any difference how these were handled. Any help would be highly appreciated.
Let us say
Case-1:
@Named(value="webBean")
@SessionScoped //javax.enterprise.context.SessionScoped
public class WebBean{
}
I get null from httpsession.get("webBean") for the case-1.
Case-2:
@ManagedBean(value="webBean")
@SessionScoped //javax.faces.bean.SessionScoped
public class WebBean{
}
I get value from httpsession.get("webBean") for the case-2.
Thanks,
Hari