code: public static Map createHeaderMap(PageContext pContext)
      {
          final HttpServletRequest request =
                  (HttpServletRequest) pContext.getRequest();
  
          return new EnumeratedMap()
          {
              public Enumeration enumerateKeys()
              {
                  return request.getHeaderNames();
              }
  
              public Object getValue(Object pKey)
              {
                  if (pKey instanceof String) {
                      return request.getHeader((String) pKey);
                  } else {
                      return null;
                  }
              }
  
              public boolean isMutable()
              {
                  return false;
              }
          };
      }
docs: Creates the Map that maps header name to single header
  value.