aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Why status code cannot be changed during session? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Why status code cannot be changed during session?" Watch "Why status code cannot be changed during session?" New topic
Author

Why status code cannot be changed during session?

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.89
[/url]
" The isCommitted() method can be used to find out if any output has been returned to the client. If this method returns true then it is too late to set the status and any attempt to do so is ignored"

Does it mean that status cannot be changed during session and then resend? Why?
Dan Jepp
Author
Ranch Hand

Joined: Jul 17, 2001
Posts: 39
Hi,
If the isCommitted() method returns true then the buffer has ben filled and the response has been committed to the client(ie they have the output in their browser!)
Changing the status code would be meaningless at this stage hence the error.
Cheers
Dan


Author <a href="http://www.amazon.com/exec/obidos/tg/detail/-/1861007701/qid=1038470361/sr=1-2/ref=sr_1_2/002-5433093-9410428?v=glance&s=books" target="_blank" rel="nofollow">Professional SCWCD Certification</a>
Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
Thanks Dan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why status code cannot be changed during session?
 
Similar Threads
GOOD BOOKS
Building HTML Forms from XML schemas?
Why status code is not buffered?
This weeks Giveaway
Professional SCWCD - Sample Chapter Available