File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Disable browser buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Disable browser buttons" Watch "Disable browser buttons" New topic
Author

Disable browser buttons

Ankur Rati
Greenhorn

Joined: Oct 04, 2009
Posts: 2
How can we disable browser buttons like back/forward from JSP?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61747
    
  67

No. Thank goodness.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi Ankur,

you cant.also read this .is this make sense?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

You cannot disable browser buttons. If you could, what should stop you from disabling other things / reading private data from the browser etc etc ? Let us know the underlying reason behind this requirement. If you do not want to display cached pages, there are ways through which that can be accomplished.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Karan Johar
Greenhorn

Joined: Oct 02, 2009
Posts: 25
No way to disable Back button using jsp. But in javascript i think you can find from history which page user coming from.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Ankur Rati wrote:How can we disable browser buttons like back/forward from JSP?


This has to be a FAQ, if not, we need to start one.

This question has been coming up since applets and other programming tools started showing up in browsers in the mid-90s. It comes because the application/scriptlette/etc. gets its state all screwed up if the user uses the normal back/forward buttons on the browser. This is true. But what
@Ankur Rati asks is the wrong question.

The proper questions is: Since my code currently gets all screwed up when the user does the Browser back/forward button thing, how do I fix my code.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42906
    
  69
This has to be a FAQ, if not, we need to start one.

It does have a FAQ entry: http://faq.javaranch.com/java/InterfaceDesignersRule1
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61747
    
  67

Indeed, asking how to disable the browser to fix application problems is like using Cover Girl to hide a rash.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Bear Bibeault wrote:Indeed, asking how to disable the browser to fix application problems is like using Cover Girl to hide a rash.


Sometimes is more like trying to use Cover Girl to hide a chainsaw wound.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18983
    
    8

Pat Farrell wrote:Sometimes is more like trying to use Cover Girl to hide a chainsaw wound.


Hey! Don't post things like that when I have a mouthful of liquid!
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Opps, sorry.

Just that it took me a decade to learn that no matter how badly you or the PHB wants you to "fix" the applet by breaking the user's expectations, it is never a good idea.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable browser buttons