How do I retrieve the FacesContext within a Filter
问题 How do I retrieve the FacesContext within a Filter? I followed following article on how to retrieve the FacesContext in a Filter : http://ocpsoft.org/java/jsf-java/jsf-20-extension-development-accessing-facescontext-in-a-filter/ But the problem is that it is not working with Flash scope. Following NPE is thrown: java.lang.NullPointerException at com.sun.faces.context.flash.ELFlash.loggingGetPhaseMapForWriting(ELFlash.java:751) at com.sun.faces.context.flash.ELFlash.getPhaseMapForWriting