Java examples for JSF:Session
put Session Param from JSF FacesContext
import java.util.Map; import java.util.Map.Entry; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; public class Main{ public static void main(String[] argv) throws Exception{ String key = "java2s.com"; Object value = "java2s.com"; putSessionParam(key,value);// w w w.ja v a 2 s. com } public static void putSessionParam(String key, Object value) { FacesContext.getCurrentInstance().getExternalContext() .getSessionMap().put(key, value); } }