Enumeration enum1 = request.getHeaderNames();
String name = "user-agent";
String value = request.getHeader(name);
if (value == null) {
// The request header was not present
}
for (; enum1.hasMoreElements(); ) {
// Get the name of the request header
name = (String)enum1.nextElement();
out.println(name);
// Get a value of the request header
value = request.getHeader(name);
// If the request header can appear more than once, get all values
Enumeration valuesEnum = request.getHeaders(name);
for (; valuesEnum.hasMoreElements(); ) {
// Get a value of the request header
value = (String)valuesEnum.nextElement();
out.println(value+"
");
}
}
New Technologies
- Java
- Javascript
- DTML
- Dot Net
- ASP .Net
- C# .Net
- PHP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment