Looks like you're right.
Thanks,
Mike
>From: Kevin Seguin
>Subject: RE: servlet authentication
>Date: Tue, 02 Jul 2002 02:39:06 -0700
>
>i could be wrong, but i think once you call
sendError(), the response is committed and
>you cannot set any more headers. try rev
i could be wrong, but i think once you call sendError(), the response is committed and
you cannot set any more headers. try reversing the order of the
sendError()/setHeader() calls:
response.setHeader("WWW-Authenticate", "BASIC realm=\"test\"");
response.sendError(response.SC_UNAUTHORIZED);