DOMResponseWriter « IceFaces « JSF Q&A





1. DOMResponseWriter.appendToCursor Issue    icefaces.org

public void preprocess() { Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); if (request.getQueryString().contains("ajaxreq")) { response.setContentType("text/xml"); response.setHeader("Cache-Control", "no-cache"); response.setCharacterEncoding("UTF8"); try { String returnStr = "eeeeeeeeeeeeeee"; ResponseWriter writer = FacesContext.getCurrentInstance().getResponseWriter(); writer.write(returnStr); } catch (EvaluationException ee) { ee.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); } catch (Exception ioe) { ioe.printStackTrace(); }finally{ FacesContext.getCurrentInstance().responseComplete(); } } }

4. DOMResponseWriter.appendToCursor    icefaces.org

Hi i have the follow error by a dataPaginator element when ich push the arrows: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.RuntimeException: Failed to append element[tag: html; attributes: ] into #document com.icesoft.faces.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:470) com.icesoft.faces.context.DOMResponseWriter.startElement(DOMResponseWriter.java:188) com.icesoft.faces.renderkit.dom_html_basic.XMLRenderer.encodeBegin(XMLRenderer.java:51) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512) com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558) com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:565) com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541) com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153) org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367) com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:69) com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:43) com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25) com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:52) com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50) com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19) com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) ...