Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

back session management

 
baxhuli pema
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, this is my first topic in this forum and I hope to get the right answers here.
I have created a login/logout form and some servlets that will be accessed if the login is successful.
I want to make sure that once the user accesses the first servlet, he will not be able to get back to get back to the
first form by going back through the back button in the browser. I used this:
<script type="text/javascript">
function disableBackButton() {
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>
but it doesn't work in firefox. However this is just to disable the button. I need someway that when the back button will be clicked
nothing will happen or at maximum the existing opened servlet will just be refreshed.
I want to know how can I do this with session tracking if anyone has an idea.
Please help me as I am new to servlets.
Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic