Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging off user (Struts)

 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I currently use an action to remove all data from the session, and everything works fine, but here is my problem:

After logging the user out, can I send the browser to another URL like
http://www.google.com or something to that nature, but not another page within the application....

Thanks

Zak
 
Shankar Narayana
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can do that with response.sendRedirect !
 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats what I had, I just put a bad action forward object in my web.xml that blew everything up.

Thanks anyway.

Zak
 
prabhat kumar
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zak Nixon:
After logging the user out, can I send the browser to another URL like
http://www.google.com or something to that nature, but not another page within the application....

Thanks

Zak[/QB]


You can do that like this in action code and struts-config

Action code:

struts-config:
remember to set the redirect="true"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic