getHeader(String name): The method getHeader(String name) of request object is used to return the value of header given in request. The returned value of header is a string.
In the above the returned value is a String.
String exfosys = request.getHeader("exforsys")
The above would retrieve the value of the HTTP header whose name is exforsys in JSP.
getHeaderNames(): The method getHeaderNames() of request object returns all the header names in the request. This method is therefore used to find the available headers. The value returned is as a enumerator of all header names.
In the above the returned value is an enumerator.
Enumeration exforsys = request.getHeaderNames();
The above returns all header names under the enumerator exforsys.