views:

125

answers:

1

I'm programming using GWT, which includes Jetty. I have defined my own servlet and when I call

response.sendError(HttpServletResponse.SC_UNAUTHORIZED, e.getMessage());

It gives me a warning that states:
WARNING: Committed before 401 No authentication specified Sep 2, 2009 2:40:36 AM com.google.apphosting.utils.jetty.JettyLogger warn java.lang.IllegalStateException: Committed at org.mortbay.jetty.Response.resetBuffer(Response.java:990) at org.mortbay.jetty.Response.sendError(Response.java:238)

Does anyone know what this means? Am I supposed to do something before I call sendError?

A: 

Turns out I was called super.doPost(req, resp);as the first thing I did. This caused the error when I tried to send an error or write to the HttpServletResponse object.

Nick
Could you accept your own answer so this doesn't show up in the Unanswered feed anymore?
Steve Armstrong