Primefaces JSF null returned from RequestContext.getCurrentInstance()
问题 I'm developing an app using Primefaces tag library. So far I've copied some examples from their official website and all seems to work except for anything that uses the RequestContext.getCurrentInstance() method. It either returns null every time, causing Tomcat to throw a NullPointer exception or hangs forever, never returning anything. Here's my code (the case where it hangs): GlobalCounterBean.java package org.primefaces.examples.view; import java.io.Serializable; import org.primefaces