GWT RPC原理浅析(二)
前一篇介绍了RPC大体的流程,核心方法是RemoteServiceServlet类中的processPost方法
private 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); }