Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting response headers before returning content

 
Satish Kota
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is it necessary to set response headers before returning the content using PrintWriter object ?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at the http protocol , you will find that the headers appear before the body and are seperated by a blank line.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic