My problem is that I can't maintain a session over more than one page. I create a session in validateLogin.jsp:
isAdmin = customerProfileBean.isUserAdmin(username);
session.setAttribute("userType",isAdmin);
System.out.println("User Type is "+isAdmin+" in validateLogin");
session.setAttribute("user",username);
System.out.println("Max Inactive Interval is: "+session.getMaxInactiveInterval());
System.out.println("Session.isNew() is "+session.isNew()+" in validate");
System.out.println("Session.getId() is "+session.getId()+" in validate");
Then I re-direct to myLucidity.jsp, and try to access the session:
String user = null;
user = (String)session.getAttribute("user");
System.out.println("User is "+user+" in myLucidity");
System.out.println("Session.isNew() is "+session.isNew()+" in myLucidity");
System.out.println("Session.getId() is "+session.getId()+" in myLucidity");
session.isNew() is "true" in both cases, and session.getId() returns different values. Why is this happening?
I have checked the max inactive interval and it's 1800, so that's not the problem.
Can anyone help?