A reconnecting websocket can't connect to the server with FacesContext.getCurrentInstance() being resolved to null
问题 I have a plain Tomcat 8.5.47 having the following dependencies installed. <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.faces</artifactId> <version>2.3.9</version> </dependency> <dependency> <groupId>org.jboss.weld.servlet</groupId> <artifactId>weld-servlet</artifactId> <version>2.4.8.Final</version> </dependency> <dependency> <groupId>javax.websocket</groupId> <artifactId>javax.websocket-api</artifactId> <version>1.1</version> </dependency> CDI seems to work fine, or at