|
|
||
Jayson Falkner's BlogBlarg #25: A JSP that shows Request HeadersPosted by jfalkner on July 03, 2006 at 06:32 PM | Comments (1)This code as been shown many times before, including in my book. This is exactly what the title says: a JSP that will display the request headers sent by your browser. It is also a good example of how to use the JSP EL and the JSTL core tags to make an incredibly simple JSP. Here is the code. Simply copy and paste it in to a JSP, ideally one that you are editing in Netbeans. You must have the JSTL JARs in your classpath.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head><title>HTTP Request Headers</title></head>
<body>
<h2>This is a list of the HTTP request headers sent by your browser.</h2>
<c:forEach var="v" items="${header}">
<b>${v.key}</b>: ${v.value}<br />
</c:forEach>
</body>
</html>
Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|