Reuirment-To Disable the Browser Back Button you need to use java script code in your jsp page.

For example, You have Page 1 and Page 2 .And you are navigation from page1 to page 2.now you click on browser bck button.
We need to disable this thing.We will be writing a javascript code into the page 1.We will use forward method.Let check what does it do-

forward()– method loads the next URL in the history list.This is the same as clicking the Forward button in the browser.JavaScript window history forward method provides the functionality to navigate the user to the next page visited by him. Actually history forward method works only if the user navigates to the previous page using back button of browser of history back method provided by JavaScript. This back history navigation enables the forward history navigation. JavaScript History object belongs to JavaScript window object that allows you to access the forward method using window.history.forward. You can also access the forward method directly as history.forward.

<script type ="text/javascript">
function stopGoingBack()
{
window.history.forward();
}
</script>
<html>
    <head>
    <title> Using the forward method of the History object</title>
    </head>
    <body>
    <form name=form1>
    Click on the button to go to the forward browser page.
    <input type="button" value="Go Forward" onload='stopGoingBack()'>
    </form>
    </body>
    </html>

Call this method on onload on the body of page.

Happy coding with techartifact with Vinay . 🙂

Vinay

I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube

  • So you meant to say “loading the page two times as previously visited page and Current visiting page, in this case I guess request will be submitted two times right ?

  • TCollins

    Hardly an example of “disabling” the back button… This example is like saying “Stop your car rolling down a hill” and instead of suggesting to apply the handbreak you tell them to accelerate in the opposite direction….

  • aditya

    What if somebody uses backspace key from keyboard to navigate?.
    What if you don’t have any page to navigate from history?.In this case, if the first page is your homepage.

    What if you use mouse–> right click –> back button to navigate.

    You have to give all the possibilities. Also, navigating to some page on only browser back button is not a good idea of disabling.

  • Narayanareddy Kummeta

    bounder taskflow fragments browser back button is it work? if have solution. please share me