*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Why status code is not buffered? 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Why status code is not buffered?" Watch "Why status code is not buffered?" New topic
Author

Why status code is not buffered?

Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
Beginner question:
Originally posted in
[url = http://www.wrox.com/books/1861007701.htm ] Professional SCWCD Sample Chapter, p.88-89
[/url]
"The first line of the server response contains the status code (200 in this case), followed by any headers, finally the border of the response.
Therefore, if the response has already been committed (or flushed) it is too late to change the status: it will have already been sent before the response body has just been committed.
HTTP headers do not cause a problem as they are buffered by the servlet and returned all at once. Therefore, the status may be set after a header has been set.

I would like to ask in this connection:
What are potential problems sending the wrong or null status code?
Why status code is not buffered?
Suppose, that HTTP headers are not buffered and what problem would it create?
Does it mean that status is always sent with headers and border, while headers are constantly monitored and may be sent separately on change?
[ December 17, 2002: Message edited by: G Vanin ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why status code is not buffered?
 
Similar Threads
response.isCommitted()???
Why status code cannot be changed during session?
sendRedirect method
Response buffering
This weeks Giveaway