What is the difference between FacesContext and ExternalContext
问题 What is the difference between FacesContext and ExternalContext ? When can I use one or other? What has the one and what has the other? The following sample is from the book JavaServer Faces 3rd edition: <h:commandButton ... actionListener="#{rushmore.handleMouseClick}" /> Backing bean: public void handleMouseClick(ActionEvent e) { FacesContext context = FacesContext.getCurrentInstance(); String clientId = e.getComponent().getClientId(context); Map<String, String> requestParams = context