I have an old web application developed using traditional JSP. I created a new application using JSF and Seam.
User logs in to the old application and his credentials (e.g. username) are saved in a session object. I have a link in the old application which when clicked, will redirect user to the new application. If i retrieve his credentials from the session object in my JSF backing bean, the result is always null.
Does anyone here know how i can retrieve values of session variable in JSF.
Below is my sample code.
In my JSP page, i have:
In my JSF page:
HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true); String user = (String) session.getAttribute("user");
But i cant seem to make this work.
Sorry, but you're really in the wrong forum for this question. This is a very basic JSF question, I suggest trying on the JSF forums at Oracle or Java Ranch.