>>> Eric Noriega <[EMAIL PROTECTED]> 10-Aug-00 4:10:07 PM >>>
>The timimg issue with placing cookies or other headers in before
>the actual transfer is started seems to come up all of the time.
This
>seems to be to be a perfect case for the need of an exception.  If
the
>header is not placed because it's too late in the cycle, the
container
>should throw a RuntimeException of some sort.  Anybody in the JCP
>listening?

Yes. The correct exception would be IllegalStateException.

One good reason why this has not already been done is that it would
invalidate a LOT of code.

Every setHeader() call (and the associated calls) would start to
generate exceptions.

I guess if one were to follow your advice and use some exception that
didn't have to be declared in the method sig then this *might* be a
solution but I don't think that would reduce the confusion.

Perhaps it's something to be considered for a major revision of the
API.


Nic Ferrier

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to