Code for Generating ClientSide SessionId:
var sesid = document.cookie;//this will give client sessionid and stores in sesid variable
Code for Generating ServerSide SessionId:
//this method will return the server side session id using getId() method
private String serverSessionid() {
HttpServletRequest hrq = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
HttpSession session = hrq.getSession();
rtnString = session.getId();
//System.out.println("SESSION ID"+rtnString);
return rtnString;
}
JSF Related topics: JCaptcha in JSF, Integrating Richfaces with JSF,Getting client and server sessionId in JSF,PopUp AlertMessagebox for JSF and more.....
Sunday, June 27, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment