code: protected void addSessionValue(final HttpServletRequest request, final String key,
        final Object value) {
      List l = (List) request.getSession(true).getAttribute(key);
      if (l == null) {
        l = new ArrayList();
      }
      l.add(value);
      request.getSession(true).setAttribute(key, l);
    }
docs: Adds a session value to the request