java - State of HttpSession instance after timeout? -


what makes httpsession instance expire after time-out when checked

 if(session!=null){          system.out.println("the instance not null");         }else{         system.out.println("the instance null");         } 

each time if-block executed.

  • for expiring session, use session.invalidate(). ensure session expired.
  • even if session invalidated, doesn't mean null

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -