<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.util.Calendar"%> <%! int cntHitsForThisPage=0; // Note the "<%!": an instance variable %> <% String currDateAsString = // Note: a local variable within a method new java.text.SimpleDateFormat("yyyy-mm-dd hh:MM:ss"). format(new java.util.Date()); %> Server - Info

Server - Information

<% if ((Calendar.getInstance().get(Calendar.HOUR_OF_DAY)) < 12){ %> Good morning, dear administrator! <% }else{ %> Good day, dear administrator! <% }%>

<%-- try this with url-parameters such as: http://localhost:8080/TheNoiseBand/ServerInfo.jsp?username=admin&password=veryInsecure --%>
Page Hits: <%= ++cntHitsForThisPage %>
Application: Version <%= application.getMajorVersion() %><%= application.getMinorVersion() %>
Application: Server Info <%= application.getServerInfo() %>
Application: Context <%= application.getContextPath() %>
Configuration: Servlet-Name <%=config.getServletName()%>
Your Session: Created <%= session.getCreationTime() %>
Your Session: isNew? <%= session.isNew() %>
This Request: Server Name(IP):Port <%= request.getLocalName() %>(<%= request.getLocalAddr() %>):<%= request.getLocalPort() %>
This Request: Language <%= request.getLocale() %>
This Request: Parameters <% java.util.Enumeration params =request.getAttributeNames(); while (params.hasMoreElements()){ Object param=params.nextElement(); out.print(param+": "); out.print(request.getParameter(param.toString())); out.print("; "); }%>
Updated: <%= currDateAsString %>

<%@ include file="copyright.txt" %> <% System.out.println("Console-LOG: to request format 'csv' append url-parameter 'format=csv', so we will forward to ServerInfoCSV.jsp"); // e.g.: http://localhost:8080/TheNoiseBand/ServerInfo.jsp?format=csv if (request.getParameter("format") != null && request.getParameter("format").equalsIgnoreCase("csv")){ response.sendRedirect("ServerInfoCSV.jsp"); }; %>