code: private void addIncludes(HttpServletRequest req)
    {
      String result = null;
      String requestId = (String) req.getAttribute(MiniProfilerFilter.REQUEST_ID_ATTRIBUTE);
      if (requestId != null)
      {
        String includesTemplate = resourceLoader.getResource("mini_profiler.html", resourceReplacements);
        if (includesTemplate != null)
        {
          result = includesTemplate.replace("@@requestId@@", requestId);
        }
      }
      if (!isEmpty(result))
      {
        req.setAttribute(INCLUDES_ATTRIBUTE, result);
      }
    }
docs: Adds the UI includes to a request attribute (named
  {@link #REQUEST_ID_ATTRIBUTE})
  
  @param req
  The current HTTP request.