Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在会话中获取所有已初始化的托管 bean?以下代码每次都会使 JVM 崩溃。
FacesContext facesContext=FacesContext.getCurrentInstance(); com.sun.faces.application.ApplicationAssociate application = ApplicationAssociate.getInstance(facesContext.getExternalContext());
你不能使用类似的东西
FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(true); Enumeration mySessionBeans = session.getAttributeNames();