• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

GetHeaders for only one value

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks...
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic