I have one question on addHeader. The difference between addHeader and setHeader is that, if the header already exists
setHeader overwrites the Header addHeader adds new value to the Header.
suppose for example i have response.addHeader("NAME","XXX"). If i am going to add new value to NAME, how it will get added?
Joined: Feb 12, 2008
If you want to add one more value to Header NAME just use response.addHeader("NAME","YYY"). You can verify the two values by using request.getHeaders("NAME").It should give XXX and YYY values.Hope this helps
Joined: Nov 20, 2007
ok. I got it. The request will read all these values by the method request.getHeaders(). Thanks.