I need to create a countdown for a servlet session to catch fires when X minutes expire ...
So, is there a way to find out how many seconds are left to end a session?
You can calculate the remaining time (in seconds) using the HttpSession API:
httpSession.getMaxInactiveInterval() - ((System.currentTimeMillis() - httpSession.getLastAccessedTime())/1000