• Post Reply Bookmark Topic Watch Topic
  • New Topic

GetHeaders for only one value

 
Mauricio Andrade
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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."
from SunCertifiedWebComponentDeveloperStudyGuide.pdf

What about call the getHeaders method for a header with only one value?
I know I could just test it, but I am at work now and I can't test it right now. Could somebody help me before I get home?

Thanks in advance.
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

getHeaders will always return a Enumeration of String objects, regardless of the number of actual values.

HTH
Siva
 
Mauricio Andrade
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!