This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I created one web page in jsp. In that i want to keep track of the username entered in the login page.
i tried with the following code but it's not working after 3 r more pages i want to keep track till the user logout. the code is used is String name=request.getParameter("username"); session.setAttribute("usernamesession",name);
and in the next page i retrieved lik this out.println(session.getAttribute("usernamesession")); Its working fine in for 3 pages after that it s displaying null value. can anyone tell me how to keeptrack of the username until the user logout thanx a lot
A session timeout is an unlikely culprit as the act of navigating between the pages will reset the session timer. A session timeout will only occur if there a prolonged period of inactivity between actions that exceeds the length of the session timeout value.