The following code can be placed in a jsp or servlet. It list request
header information like:
Accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint,
*/*
Referer = http://localhost:8080/your_dir/
Accept-Language = en-us,zh;q=0.5
Accept-Encoding = gzip, deflate
User-Agent = Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
Host = localhost:8080
Connection = Keep-Alive
Cookie = SESSIONID=To1010mC24918710110150832At
<% Enumeration requestEnum = request.getHeaderNames();
while( requestEnum.hasMoreElements() ) {
String key =
(String)requestEnum.nextElement();
out.print( "<BR>" + key + " = " +
request.getHeader(key) );
}//while
%>
-----Original Message-----
From: Chris Newland [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 09, 2000 9:14 AM
To: [EMAIL PROTECTED]
Subject: How can I view client HTTP request headers?
Hi,
I'm writing a standalone java application to test my
JSP-based service and I'd like to view the HTTP
request headers that are sent to my web server.
Does anyone have any example code / know of a 3rd
party product which does this?
Thanks,
Chris
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets