0

如何在会话中获取所有已初始化的托管 bean?以下代码每次都会使 JVM 崩溃。

FacesContext facesContext=FacesContext.getCurrentInstance();
com.sun.faces.application.ApplicationAssociate application = 
ApplicationAssociate.getInstance(facesContext.getExternalContext());
4

1 回答 1

1

你不能使用类似的东西

 FacesContext context = FacesContext.getCurrentInstance();
 HttpSession session = (HttpSession) context.getExternalContext().getSession(true);
 Enumeration mySessionBeans = session.getAttributeNames();
于 2012-05-16T09:21:13.727 回答