HTTP fejléc

Ez a rutin a HTTP fejléceket írja ki.

<?xml version="1.0" encoding="utf-8" ?>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
  <head>
    <title>HTTP fejlécek listája</title>
  </head>
  <body>
Ez az oldal a következő HTTP fejlécekkel rendelkezik:<br />
    <table>
      <c:forEach var="httpheaders" items="${header}"> 
        <tr><td><c:out value="${httpheaders.key}" /></td><td><c:out value="${httpheaders.value}" /></td></tr>
      </c:forEach>
    </table>
  </body>
</html>

Az eredménye pedig:

This page has the following HTTP headers:
cache-control	no-cache
cookie	JSESSIONID=094A77D4E17816B1D5E5EAE2B32FC766
connection	keep-alive
accept-language	hu-hu,hu;q=0.8,en-us;q=0.5,en;q=0.3
host	localhost:8080
accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
keep-alive	300
user-agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
accept-encoding	gzip,deflate
pragma	no-cache
accept-charset	ISO-8859-2,utf-8;q=0.7,*;q=0.7