• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

How to do logout in struts application

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In my application I have a login page after providing correct login information I am able to login to the application and I can navigate to all the pages. The problem now is say suppose if I am in third page or some other page in the appliation, and if I copy the url and paste it in the new browser window the application is showing the page, in that situation I need to show the login page because in the new window user doesn't provide user name and password and there is no session to that new window. How can I redirect the user to the login page in that situation.

Thanks,
 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Check the above thing in action class.This is one type of solution(not the best one).
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure why this would matter, honestly. If you're worried about authentication, if the same user pastes the url from an authenticated session in 1 browser into another browser, it's still the same user that's already authenticated. If instead, you're trying to force the application to only be open in one browser at a time, you could set some field in a database or cookie or something that says the user is already logged on, and then flip that bit when they logout or timeout ... What exactly is your concern?
Hope this helps.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic