Even though you can access JavaBeans stored in the session, request, or application scopes
through normal Servlet API objects like HttpServletSession or HttpServletRequest
(which you can get from the ExternalContext object), you should access them through
JavaServer Faces' ValueBinding class instead. This allows you to use the
managed beans facility, which automatically creates JavaBeans if they don't
already exist (assuming they are declared in faces-config.xml).
You can do this by getting a ValueBinding instance from the Application class:
FacesContext facesContext = FacesContext.getCurrentInstance();
Application app = facesContext.getApplication();
MyObject myObject = (MyObject)app.createValueBinding("#{myObject}").
getValue(facesContext);