java 清除所有 Session

Enumeration em = request.getSession().getAttributeNames();
        while (em.hasMoreElements()) {
            request.getSession().removeAttribute(em.nextElement().toString());
        }

 

posted @ 2018-12-10 16:51  宁任翃  阅读(1791)  评论(0编辑  收藏  举报