root/trunk/myweb/WebContent/ShowHeaders.jsp

Revision 31, 0.9 KB (checked in by yabuki, 3 years ago)
  • Property svn:mime-type set to text/plain
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<%@ page language="java" contentType="text/html; charset=UTF-8"
3    pageEncoding="UTF-8" import="java.util.*"%>
4<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
5<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6<html xmlns="http://www.w3.org/1999/xhtml">
7<head>
8<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
9<title>Insert title here</title>
10</head>
11<body>
12<table>
13<%
14for (Enumeration nameEnum=request.getHeaderNames();nameEnum.hasMoreElements();) {
15  String name=(String)nameEnum.nextElement();
16  for (Enumeration e=request.getHeaders(name);e.hasMoreElements();) {
17    String value=(String)e.nextElement();%>
18    <tr>
19      <th><c:out value="<%=name %>" /></th>
20      <td><c:out value="<%=value %>" /></td>
21    </tr><%
22  }
23}
24%>
25</table>
26</body>
27</html>
Note: See TracBrowser for help on using the browser.