ParametredHttpServlet
ConfiguredHttpServlet
    public void service(FacesContext facesContext, String commandId) {        Map parameters = facesContext.getExternalContext()                .getRequestParameterMap();        UIViewRoot viewRoot = facesContext.getViewRoot();        String componentId = (String) parameters.get("componentId");        if (componentId == null) {            sendJsError(facesContext, "Can not find 'componentId' parameter.");            return;        }        String filterExpression = (String) parameters.get("filterExpression");        UIComponent component = ComponentTools.getForComponent(facesContext,                componentId, viewRoot);        if (component == null) {            // Cas special: la session a du expir�e ....            sendCancel(facesContext, componentId);            return;        }        if ((component instanceof IFilterCapability) == false) {            sendJsError(facesContext, "Component (id='" + componentId                    + "') can not be filtered.");            return;        }        int maxResultNumber = -1;        if (component instanceof IMaxResultNumberCapability) {            String s = (String) parameters.get("maxResultNumber");            if (s != null) {                maxResultNumber = Integer.parseInt(s);            }        }        IFilterCapability filterCapability = (IFilterCapability) component;        IFilteredItemsRenderer filteredItemsRenderer = getFilteredItemsRenderer(                facesContext, filterCapability);        if (filteredItemsRenderer == null) {            sendJsError(facesContext,                    "Can not find filteredItemsRenderer. (componentId='"                            + componentId + "')");            return;        }        ServletResponse response = (ServletResponse) facesContext                .getExternalContext().getResponse();        setNoCache(response);        response.setContentType(IHtmlRenderContext.JAVASCRIPT_TYPE                + "; charset=" + RESPONSE_CHARSET);        boolean useGzip = canUseGzip(facesContext);        PrintWriter printWriter = null;        try {            if (useGzip == false) {                printWriter = response.getWriter();            } else {                ParametredHttpServlet                        .setGzipContentEncoding((HttpServletResponse) response);                OutputStream outputStream = response.getOutputStream();                GZIPOutputStream gzipOutputStream = new GZIPOutputStream(                        outputStream, DEFAULT_BUFFER_SIZE);                Writer writer = new OutputStreamWriter(gzipOutputStream,                        RESPONSE_CHARSET);                printWriter = new PrintWriter(writer, false);            }            IFilterProperties filterProperties = HtmlTools                    .decodeFilterExpression(component, filterExpression);            writeJs(facesContext, printWriter, filterCapability, componentId,                    filteredItemsRenderer, filterProperties, maxResultNumber);        } catch (IOException ex) {            throw new FacesException(                    "Can not write dataGrid javascript rows !", ex);        } finally {            if (printWriter != null) {                printWriter.close();            }        }        facesContext.responseComplete();    }