This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to do LOGOUT with servlet

 
Yi Meng
Ranch Hand
Posts: 270
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
say i have basic authentication for some resources.
the user first has to login, no problem. But what if the user wants to logout? The desired should be that the user can still view other non-protected web pages and if the user wants to view those protected pages, it should prompt the user to login again. How to do this?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on how you are doing the authentication. If you are doing it yourself, you can put something in the session when they login successfuly. When they logout, delete that from the session. They can still look at other pages. If they try to look at a protected page, it will look for that value in the session and reprompt them.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic