code: private static void exposeRequestAttributeIfNotPresent(ServletRequest request, String name, Object value) {
          if (request.getAttribute(name) == null) {
              request.setAttribute(name, value);
          }
      }
docs: Expose the specified request attribute if not already present.
  @param request current servlet request
  @param name the name of the attribute
  @param value the suggested value of the attribute