Yes, Mo Rock's code sample from may 28th in the article "GWT + Grizzly +
Comet" uses getWriter() in their SimpleServiceServlet sample, as follows:
/**
* Write the response payload to the response stream.
*/
public void writeResponse(HttpServletRequest request,
HttpServletResponse response, String responsePayload) throws IOException {
PrintWriter writer = response.getWriter();
writer.write(responsePayload);
writer.flush();
}
To resolve my problem, I replaced this with:
protected boolean shouldCompressResponse(HttpServletRequest
request, HttpServletResponse response, String responsePayload) {
return
RPCServletUtils.exceedsUncompressedContentLengthLimit(responsePayload);
}
public void writeResponse(HttpServletRequest request,
HttpServletResponse response, String responsePayload) throws IOException {
boolean gzipEncode =
RPCServletUtils.acceptsGzipEncoding(request) &&
shouldCompressResponse(request, response, responsePayload);
RPCServletUtils.writeResponse(getServletContext(), response,
responsePayload, gzipEncode);
}
I already a request to Mo Rock's site to change their sample code that
they make available for download.
Thanks Jeanfrancois.