private static final String UNSPECIFIED = "Unspecified in Manifest";
private static final long MILLISECONDS_PER_DAY = 1000*60*60*24L;
private static final Logger fLogger = Util.getLogger(ShowDiagnostics.class);
private void placeDiagnosticDataInScope(HttpServletRequest aRequest, HttpServletResponse aResponse) throws DAOException {
Stopwatch stopwatch = new Stopwatch();
stopwatch.start();
fLogger.fine("Adding system properties.");
addToRequest("systemProperties", sortMap(System.getProperties()));
fLogger.fine("Adding Context init-params.");
addToRequest("contextInitParams", sortMap(getContextInitParams(aRequest)));
fLogger.fine("Adding application scope items.");
addToRequest("appScopeItems", getAppScope(aRequest));
fLogger.fine("Adding session scope items.");
addToRequest("sessionScopeItems", getSessionScope(aRequest));
fLogger.fine("Adding container/servlet info.");
addToRequest("containerServletInfo", getContainerServletInfo(aRequest));
fLogger.fine("Adding request info.");
addToRequest("requestInfo", getRequestInfo(aRequest));
fLogger.fine("Adding database information.");
addToRequest("dbInfo", getDbInfo());
fLogger.fine("Adding loggers.");
addToRequest("loggers", getLoggers());
fLogger.fine("Adding Controller name/version");
addToRequest("controller_name_version", Controller.WEB4J_VERSION);
fLogger.fine("Adding JAR versions.");
addToRequest("jarVersions", getJarVersions(aRequest));
fLogger.fine("Adding uptime.");
addToRequest("uptime", getUptime(aRequest));
fLogger.fine("Adding request headers.");
addToRequest("headers", getHeaders(aRequest));
addToRequest("responseEncoding", getResponseEncoding(aResponse));
fLogger.fine("Adding cookies.");
addToRequest("cookies", getCookies(aRequest));
fLogger.fine("Finished retrieving data.");
stopwatch.stop();
addToRequest("stopwatch", stopwatch.toString());
}