Package javax.servlet.http

Examples of javax.servlet.http.HttpServletResponse.reset()


                throw new ExportException(getClass());
            }

            try
            {
                response.reset();
                pageContext.getOut().clearBuffer();
            }
            catch (Exception e)
            {
                throw new ExportException(getClass());
View Full Code Here


                if (response instanceof HttpServletResponse)
                {
                    HttpServletResponse httpResp = (HttpServletResponse) response;
                    if (!httpResp.isCommitted())
                    {
                        httpResp.reset();
                        if (facesContext.getPartialViewContext().isAjaxRequest())
                        {
                            // ajax request --> xml error page
                            httpResp.setContentType("text/xml; charset=UTF-8");
                            try
View Full Code Here

                if (response instanceof HttpServletResponse)
                {
                    HttpServletResponse httpResp = (HttpServletResponse) response;
                    if (!httpResp.isCommitted())
                    {
                        httpResp.reset();
                        if (facesContext.getPartialViewContext().isAjaxRequest())
                        {
                            // ajax request --> xml error page
                            httpResp.setContentType("text/xml; charset=UTF-8");
                            try
View Full Code Here

    @Override
    public void startDocument() throws IOException {
        facesContext = FacesContext.getCurrentInstance();
        ExternalContext externalContext = facesContext.getExternalContext();
        HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
        response.reset();
        response.setContentType(contentType);
        response.setHeader("Content-Disposition", "inline; filename=\"" + UUID.randomUUID().toString() + ".pdf" + "\"");
        OutputStream browserStream = response.getOutputStream();
        startDocumentInternal(browserStream);
    }
View Full Code Here

            (HttpServletResponse) response.getResponse();

        try {

            // Reset the response if possible (else IllegalStateException)
            hres.reset();

            // Forward control to the specified location
            ServletContext servletContext =
                request.getContext().getServletContext();
            RequestDispatcher rd =
View Full Code Here

                if (response instanceof HttpServletResponse)
                {
                    HttpServletResponse httpResp = (HttpServletResponse) response;
                    if (!httpResp.isCommitted())
                    {
                        httpResp.reset();
                        if (facesContext.getPartialViewContext().isAjaxRequest())
                        {
                            // ajax request --> xml error page
                            httpResp.setContentType("text/xml; charset=UTF-8");
                            try
View Full Code Here

                throw new ExportException(getClass());
            }

            try
            {
                response.reset();
                pageContext.getOut().clearBuffer();
            }
            catch (Exception e)
            {
                throw new ExportException(getClass());
View Full Code Here

        out.close();
        
      }
      catch (Exception e)
      {
        hsr.reset();
        _LOG.warning(e);      
        FacesMessage message = MessageFactory.getMessage(context, DOWNLOAD_MESSAGE_ID);
        context.addMessage(null, message);
        context.renderResponse();
        return;
View Full Code Here

        ResponseWriter responseWriter;
        if (null != oldWriter) {
            responseWriter = oldWriter.cloneWithWriter(response.getWriter());
        } else {
            response.reset();
            responseWriter = newWriter.cloneWithWriter(response.getWriter());
        }

        // now render the UIViewRoot
        newWriter.startDocument();
View Full Code Here

        Object response = facesContext.getExternalContext().getResponse();
        if(response instanceof HttpServletResponse) {
            HttpServletResponse httpResp = (HttpServletResponse) response;
            if (!httpResp.isCommitted()) {
                httpResp.reset();
                httpResp.setContentType("text/html; charset=UTF-8");
                Writer writer = httpResp.getWriter();

                debugHtml(writer, facesContext, ex);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.