public void setAttribute(String name, Object value) {
    HttpSession session = getHttpSession();
    if (session != null) {
      session.setAttribute(name, value);
    }
  }
Set an attribute value on the current session.

@param name   the attribute name
@param value  the attribute value
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariSessionManager.java