• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Logging out issue

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to handle back button issue after logging out from web application?

In detail..

If we log out from the application and again if we press back button from browser then it again redirects back to the page where we were before logging our..

So how do we handle this type of issue?


 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Login--[redirect]----->Home page--->Logout-----[Redirect]--->Login Page and Clear Browser Cache .Importantly Check the Valid Session .
 
Prashant Langade
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wanted to know how this can be programatically achieved???
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Prashant Langade wrote:how this can be programatically achieved???



what do you mean by programatically ? your program[web application] should follow certain design right?

also search here(javaranch) for PRG Techniquie
 
Prashant Langade
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By saying "Programatically", i mean to say that either back button of the browser should get disabled upon logging out or even if it not,then upon clicking back button,it should not redirect to the previous page.

What is PRG?



Prashant
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When user clicks log-out button, clear authentication info where ever you may have (commonly cookies ?) and forward / re-direct user to the log in page. I guess you can also play a bit on the browser URL history.

good luck, sen
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you use session objects, make sure you invalidate the session.


Also inside your JSP, add a snippet of code that checks whether the authentication object is still in session. If not, then redirect the user to the login.jsp page

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

senthil doraiswamy wrote: I guess you can also play a bit on the browser URL history.



Don't Highly Discouraged
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic