![]() |
JSP Session
Hi,
I need help with JSP session. My problem: I have a login page. When a user logs in then, i set a session and its expiration time. So, when the session is expired, the user will be redirected to the login page with a session expired message. I want to identify if a page has been loaded first time by the user, or it has been loaded as a result of expiration of session. My code: I do the following when the user successfully logs in: Code:
session.setAttribute("username",user_id);Code:
String username = (String) session.getAttribute("username");Code:
session.invalidate(); |
| All times are GMT +5.5. The time now is 19:13. |