File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Handle back button

 
Sri Kor
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In web applications using JSP, Servlets how do we handle back and forward buttons of the browser.
Thanks,
Srikanth
 
Sam Smoot
Ranch Hand
Posts: 238
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those are managed by the browser and the history objects. You can't really disable them easily.
 
john hedden
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i looked at this a few weeks back and found out that: 1. train users not to use browser buttons or 2. use get instead of post. (haven't tried it out yet).
 
Shubhrajit Chatterjee
Ranch Hand
Posts: 356
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some java script trick....
<body on load = "javascript:history.forward(1)" >

Search the forum for a discussion, merits and demerits of this trick.
 
Sam Smoot
Ranch Hand
Posts: 238
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correction:
The code should be

and is not a nice trick to play.. but it is effective...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic