• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setHeader() and addHeader() practical example

 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am looking for a pratical example of using setHeader() and addHeader() which can clearly mention the difference between these two.
Please provide me such example.

Thanks in advance
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setHeader sets a named response header and replaces any existing headers with that name. addHeader on the other hand doesn't replace any existing headers with the same name. You can inspect response headers in Firefox using Web Developer Toolbar and using ieHttpHeaders for Internet Explorer...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic