Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Seth Ford   on Jan 09 In Java Category.

  
Question Answered By: Dirck Jansen   on Jan 09

after user  logged out from the system, you have to invalidate the user's session. as you know each user has his/her own session, then invalidating a session  does not  affect others session.
if you are using JSF you have to write  line of code in your backing bean as follow:

((HttpSession) FacesContext.getCurrentInstance().getExternalContent().getSession(true)).invalidate();

if you are using Struts or Common Java Servlet you can do it by Code as follow on your action/doget/dopost method:
httpServletRequest().getSession().invalidate();

i hope this email can solve your problem

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Using session attribute in tomcat Or get search suggestion and latest updates.


Tagged: