Thank you all guys for you continuous support and helping people.
I have another question. I was trying to end the current session by calling invalidate() which doesn't seem to quite work. When I press the browsers back button, I am still able to perform all the funtions of the user who has logged in.
Because everything is cached. This is a common problem which is tricky to resolve because different browsers handle caching in different ways. You might want to check out thisthread in the Servlets forum where they have been discussing a very similar issue.
but still it doesn't seem to work. The login information still seemed to be cached and the user is able to perform all teh actions after hitting the logout button.
I can get back all the information by refreshing the page.
I am having the same problem and want to flush out the session variables on log out. Could you tell me how to end the session.? I jus' write <%=session.invalidate()%> in the logout.jsp file. I wonder if that is enough to terminate all session variables.
According to the documentation for javax.servlet.http.HttpSession in the the J2EE 1.4 API Specification, the invalidate method "[i]nvalidates this session then unbinds any objects bound to it."