2009-04-21 104 views

回答

37
FacesContext fCtx = FacesContext.getCurrentInstance(); 
HttpSession session = (HttpSession) fCtx.getExternalContext().getSession(false); 
String sessionId = session.getId(); 
+3

我剛要回答幾乎完全相同的代碼:) – 2009-04-21 13:30:05