jQuery in Action, 3rd edition
The moose likes Struts and the fly likes How to do logout in struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to do logout in struts application" Watch "How to do logout in struts application" New topic

How to do logout in struts application

Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40

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.

vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580

Check the above thing in action class.This is one type of solution(not the best one).
John Melton
Ranch Hand

Joined: Aug 17, 2004
Posts: 49
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.

I agree. Here's the link: http://aspose.com/file-tools
subject: How to do logout in struts application
It's not a secret anymore!