This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do logout in struts application

 
Pramod Kumar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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,
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Check the above thing in action class.This is one type of solution(not the best one).
 
John Melton
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic