This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
 
subject: Setting response headers before returning content
 
Similar Threads
Error in Dowlnoading
Correct Generated File Extensions from Action
response.isCommitted()???
Redirect behind proxy
Running same servlet in different browser windows