Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

help with JSP code for back button in IE

  Asked By: Bakir    Date: Apr 07    Category: Java    Views: 3048

I hve one doubt
I developed one jsp appln .If i logout from my appln Logout page will be
open after that i press BACK btn in Internet Explorer then it goes to previous
page of my appln .But
i want to go Login page of my JSP application.

What can i do for this plz any one help me for this task.



3 Answers Found

Answer #1    Answered By: Patricia Johnson     Answered On: Apr 07

put session condition on a previous page.if session is
invalidate redirect it to login  page.

Answer #2    Answered By: Calandre Bernard     Answered On: Apr 07

there is not much that you can do in this secanario. The page  is cached by
your browser
so when you hit the back  button will cause the page to show up. You will
also notice
that no request will be send to your server so it does not help  if you check
for an empty
session or whatever was suggested before.
You can define in the meta tags of your html that the page should not be
cached by the browser.
However this works not always since certain browser does not care about
this. Another problem
is when you have a proxy in between.

Answer #3    Answered By: Alyssa Campbell     Answered On: Apr 07

you can solve your problem adding a javascript in your logout button  or

make a redirect to your login.jsp page  then add a script

function doLogout()
window.location = "login.jsp";

but you still have a problem, user could call a page throught the url, so don´t
forget to destroy your session and configure your login
page in yout web.xml when session is destroyed.

Didn't find what you were looking for? Find more on help with JSP code for back button in IE Or get search suggestion and latest updates.