Q.) Friends if anybody worked for online banking project,Please do help me with your answers for the following question?
When a customer logs-in into his account, and then after entering into his account, he clicks the go Back button . Then he should see the error Page instead of the Bank Log-in Page. How can we do this? Please explain the technical part to do this?
Joined: Aug 17, 2006
I hope you would be coding a Servlet to authenticate the user. Once the user is authenticated the user bean has to be saved to 'Session' so that other pages can use it for preferences and other stuff.
So coming to the point if the user clicks 'Back' button, same URL would be called there by directing the request to the same Servlet.
In the Servlet check if session's user attribute is not null then forward to 'error page' else authenticate the user and preserve it in the session.
Hope this helps.
Joined: Sep 29, 2002
Are you referring to the back button of a browser? If so, why have this back button for a secure application? It would be best not to have it at all and instead have a link on the web page to take the user back to a previous page.