code: public void dumpRequest(final HttpServletRequest req) {
      try {
        Enumeration names = req.getHeaderNames();
  
        String title = "Request headers";
  
        debug(title);
  
        while (names.hasMoreElements()) {
          String key = (String)names.nextElement();
          String val = req.getHeader(key);
          debug("  " + key + " = \"" + val + "\"");
        }
  
        names = req.getParameterNames();
  
        title = "Request parameters";
  
        debug(title + " - global info and uris");
        debug("getRemoteAddr = " + req.getRemoteAddr());
        debug("getRequestURI = " + req.getRequestURI());
        debug("getRemoteUser = " + req.getRemoteUser());
        debug("getRequestedSessionId = " + req.getRequestedSessionId());
        debug("HttpUtils.getRequestURL(req) = " + req.getRequestURL());
        debug("contextPath=" + req.getContextPath());
        debug("query=" + req.getQueryString());
        debug("contentlen=" + req.getContentLength());
        debug("request=" + req);
        debug("parameters:");
  
        debug(title);
  
        while (names.hasMoreElements()) {
          String key = (String)names.nextElement();
          String val = req.getParameter(key);
          debug("  " + key + " = \"" + val + "\"");
        }
      } catch (Throwable t) {
      }
    }
docs: Debug
  
  @param req