I am new to
jsp's and
servlets . I am trying out an example of login and logout . The flow is
home.jsp->login.jsp->welcome.jsp->logout.jsp
login.jsp just checks if the password entered and password in the database is right or wrong and redirects it to "welcome.jsp" or "error.jsp" according to the password validation .
But after logging out when i click the back button it sends me back to welcome.jsp and with all my credentials . I understand it's the browser's cache which is responsible for the behavior and i added extra headers to counter that problem which gave some success .
I am writing the following code to counter this problem
welcome.jsp
and in logout.jsp
All this code does is that when i click the back button is that it gives output as :
welcome null!
So it means that session variable is still not null .
So can somebody tell me that what is happening in the back side ? Even when i tried this code in logout.jsp , the
test is coming out to be false :
So how is the session getting instantiated again and again ?