ParametredHttpServlet
ConfiguredHttpServlet
    public void service(FacesContext facesContext, String commandId) {        Map parameters = facesContext.getExternalContext()                .getRequestParameterMap();        UIViewRoot viewRoot = facesContext.getViewRoot();        String treeId = (String) parameters.get("treeId");        if (treeId == null) {            sendJsError(facesContext, "Can not find 'treeId' parameter.");            return;        }        String waitingId = (String) parameters.get("waitingId");        if (waitingId == null) {            sendJsError(facesContext, "Can not find 'waitingId' parameter.");            return;        }        String node = (String) parameters.get("node");        if (node == null) {            sendJsError(facesContext, "Can not find 'node' parameter.");            return;        }        UIComponent component = ComponentTools.getForComponent(facesContext,                treeId, viewRoot);        if (component == null) {            // Cas special: la session a du expir�e ....            sendCancel(facesContext, treeId, waitingId);            return;        }        if ((component instanceof TreeComponent) == false) {            sendJsError(facesContext, "Can not find treeComponent (id='"                    + treeId + "').");            return;        }        TreeComponent treeComponent = (TreeComponent) component;        TreeRenderer treeRenderer = getTreeRenderer(facesContext, treeComponent);        if (treeRenderer == null) {            sendJsError(facesContext, "Can not find treeRenderer. (treeId='"                    + treeId + "')");            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);            }            writeJs(facesContext, printWriter, treeComponent, treeId,                    treeRenderer, waitingId, node);        } catch (IOException ex) {            throw new FacesException(                    "Can not write dataGrid javascript rows !", ex);        } finally {            if (printWriter != null) {                printWriter.close();            }        }        facesContext.responseComplete();    }