aspose file tools*
The moose likes Servlets and the fly likes Setting response headers before returning content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Setting response headers before returning content" Watch "Setting response headers before returning content" New topic
Author

Setting response headers before returning content

Satish Kota
Ranch Hand

Joined: Feb 08, 2006
Posts: 88
Why is it necessary to set response headers before returning the content using PrintWriter object ?


SCJP 5.0 77%
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
If you look at the http protocol , you will find that the headers appear before the body and are seperated by a blank line.


Rahul Bhattacharjee
LinkedIn - Blog
 
Don't get me started about those stupid light bulbs.
 
subject: Setting response headers before returning content