PageCodeBase getSession method instead of sessionMap


/ Published in: Java
Save to your folder(s)

Who cares about manipulating Maps when you can just use the HttpSession object instead right inside your page code backing bean. Who woulda thunk people would like that better. Just add this to your PageCodeBase.java class


Copy this code and paste it in your HTML
  1. public HttpSession getSession()
  2. {
  3. return (HttpSession) getFacesContext().getExternalContext().getSession(false);
  4. }

Report this snippet


Comments


You need to login to view comments.