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
Post a Comment