aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes addheader and addcookie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "addheader and addcookie" Watch "addheader and addcookie" New topic
Author

addheader and addcookie

jamil lusa
Ranch Hand

Joined: Aug 18, 2011
Posts: 59
[color=darkred]i know setheader will replace the previous header value, how about addheader? how does it handle mutliple same name string added? for example:


what happens if i getHeader('abc')? there is no any clue from API.


thank in advanced![/color]
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1529
    
  22

Hi

what happens if i getHeader('abc')? there is no any clue from API.

There actually is an explanation:

javax.servlet.http Interface HttpServletResponse getHeader

java.lang.String getHeader(java.lang.String name)

Gets the value of the response header with the given name.
If a response header with the given name exists and contains multiple values, the value that was added first will be returned.


Regards,
Frits
jamil lusa
Ranch Hand

Joined: Aug 18, 2011
Posts: 59
thanks, i thought getHeader is from HttpServletRequest API xD. that is why i cannot find the info.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: addheader and addcookie
 
Similar Threads
doubt on response.addHeader
request headers question ...
Compiling multiple source files
Whats wrong with this code ?
How many objects will be created in the string pool?