打印session

阅读更多
很久以前弄的了  那时候还不会debug   现在嘛........谁知道呢  或许以后会用得到


	public static void printSession(HttpServletRequest _req) {
		System.out.println("=======================sessionID="+_req.getSession().getId());
		for (Enumeration _em = _req.getSession().getAttributeNames(); _em.hasMoreElements();) {
			String parameterName = (String) _em.nextElement();
			Object obj = (Object)_req.getSession().getValue(parameterName);
			System.out.println("=====Param name is ="+parameterName+"=============Param value is ="+obj);		
		}
		System.out.println("=======================Print over=====================");
	}

你可能感兴趣的:(打印session)