> Jozef Chocholacek wrote:
> >
> >  > response.sendError(HttpServletResponse.SC_NO_CONTENT);
> >
> > Eek, I really discourage you from using this behavior - if the
> > request is correct and all actions the servlet has to do has been
> > performed succesfully, this in very bad idea to send back any
> > error code.
> >
>
>  SC_NO_CONTENT isn't an error code. HTTP errors are three
> digits starting with a "4". It's perfectly appropriate to
> send back 204/No Content if it matches the semantics you
> want.
>
>  Assuming the servlet container and client are properly
> implemented, you ought to be able to use either sendError
> or setStatus to send back a 204. (well, in theory either
> should work, but assuming properly written clients and
> servers might be unrealistic)
>
>  The original poster might want to try 'setStatus' instead
> of 'sendError' and see if that works. Personally, I would
> try to avoid using an applet (or even javascript) if at
> all possible.

Christopher,
I have tried setStatus (I actually did that first). I've also tried
flush/close on the response as well as several other variations. Nothing
I've tried has a different result. Currently the method I'm having to use is
to send back a page which immediately goes back to the previous page :-(
yuk.

This is why I was trying to write a test prog to view the entire response
(another question I sent to the list a few days ago), I was trying to see
*exactly* what response was being sent for this servlet.

Its good to see that I'm not completely up the wrong path :-) 204 *seemed*
to be exactly what I needed.

Michael Rutherfurd

___________________________________________________________________________
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