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.
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.