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.
catch it before it slithers away! Oh wait, it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking