I'm new to session tracking. So, need some detailed advice.
I'm having two beans - UserBean(session scope) and StudentDetailsBean(request scope) and I have two JSP pages. In the first JSP page, a user has to login. If the login is successful, then the second JSP page comes up which asks for student details. These details are inserted into the corresponding table in the database. But, in that table, I need to insert the student's userId also which I have to get from the session bean (Userbean.userId). UserId is an attribute of UserBean and not of StudentDetailsBean
What should I add to the code in the StudentDetailsBean that will extract the session variable (UserId) so that I can insert the appropriate UserId for every successful login?
Please let me know how to do this as I haven't used JSF for session tracking earlier.