可以这样判断:session.getAttribute(sessionName) == null 时间是通过 setMaxInactiveInterval(int seconds) 来设定的
得到用: public int getMaxInactiveInterval()