<%@ page language="java" contentType="text/html; charset=iso-8859-2" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="java.util.StringTokenizer" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Nagłówki</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css">
td,th,body { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10pt; }
</style>
</head>

<body>

<h3 align="center">Informacje o nagłówkach</h3>

<p>Nagłówki</p>
<ul>
<li>Accept: <%= request.getHeader("Accept") %></li>
<li>Accept:
 <ul>
<%
  StringTokenizer acceptTable = new StringTokenizer(request.getHeader("Accept"),",");
  while (acceptTable.hasMoreTokens())
  {
    out.println("<li>"+acceptTable.nextToken()+"</li>");
  }
%>
 </ul>
</li>
<li>Wszystkie nagłówki:
 <ul>
<%
  Enumeration requestNames = request.getHeaderNames();
  while (requestNames.hasMoreElements())
  {
    String currentName = requestNames.nextElement().toString();
    String currentVal = request.getHeader(currentName);
    out.print("<li>"+currentName+" = "+currentVal+"</li>");
  }
%>
 </ul>
</li>
<li>Locales:
 <ul>
<%
  requestNames = request.getLocales();
  while (requestNames.hasMoreElements())
  {
    String currentVal = requestNames.nextElement().toString();
    out.print("<li>"+currentVal+"</li>");
  }
%>
 </ul>
</li>
<li><%= request.getLocale() %></li>
</ul>

<p>Info o sewerze</p>
<ul><li><%= application.getServerInfo() %></li></ul>

</body>
</html>
