jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes doubt regarding HttpServletResponse.addHeader method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "doubt regarding HttpServletResponse.addHeader method" Watch "doubt regarding HttpServletResponse.addHeader method" New topic
Author

doubt regarding HttpServletResponse.addHeader method

yogesh srinivasan
Ranch Hand

Joined: Jun 08, 2007
Posts: 55
In what ways the headers added to a response could be used ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

Most often to describe the content.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9400
    
  20

Normally all the useful headers have a corresponding setter methods already defined in the HttpServletResponse class.
For example to set the content type you have HttpServletResponse.setContentType, for setting cookies you have HttpServletResponse.addCookie.

So normally you will not need to use HttpServletResponse.setXxxHeader() methods.


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
Have you checked out Aspose?
 
subject: doubt regarding HttpServletResponse.addHeader method
 
It's not a secret anymore!