Hi Prasad,
we have setHeader and addHeader in response because once if we forward the response to other jsp or servlets you can use it .
I dont quite agree with you on this.
The reason I don't agree with you is that, whether you forward or include the response to other jsp or servlets, you are ultimately forwarding the original request and response objects that you have received from the client. Therefore even if you add or set headers on your response object it won't be available to the forwarded servlet.