SRV.4.3 Headers A servlet can access the headers of an HTTP request through the following methods of the HttpServletRequest interface: • getHeader • getHeaders • getHeaderNames The getHeader method returns a header given the name of the header. There can be multiple headers with the same name, e.g. Cache-Control headers, in an HTTP request. If there are multiple headers with the same name, the getHeader method returns the first head in the request. The getHeaders method allows access to all the header values associated with a particular header name, returning an Enumeration of String objects.
posted 17 years ago
Thanks. It looks like my book is wrong.
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design