java - Contdown on Servlet Session -


When I expire the X minutes, I need a countdown on the topmost session to fire events ...

So, one way to know how many seconds are left to end the session?

You can calculate the remaining time (in seconds) using the API:

  httpSession.getMaxInactiveInterval () - ((System.currentTimeMillis () - httpSession.getLastAccessedTime ()) / 1000    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -