Session attribute keeps coming back null
843833Jun 30 2003 — edited Oct 23 2003I have a jsp to log in new users. Once a user logs in, I set a userId session attribute in my login servlet.
session.setAttribute("userId", userId);
If the login is valid, I flow to a second servlet to retrieve information based on that user. However, when I try and access the session userId, I get a null value.
userId = (String) session.getAttribute("userId");
Any ideas why I might be losing session information in my second servlet?
Thanks!