code: public <T> T getSessionAttr(String key) {
  		HttpSession session = request.getSession(false);
  		return session != null ? (T)session.getAttribute(key) : null;
  	}
docs: Return a Object from session.
  @param key a String specifying the key of the Object stored in session