Package javax.servlet.http

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


        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, exceptionList);
View Full Code Here


        assertSame(writer1, swr.getPrintWriter(new ContentType("foo/bar")));

        verifyControls();

        response.reset();
        response.setContentType("zip/zap");
        response.getWriter();
        setReturnValue(response,writer2);

        replayControls();
View Full Code Here

    public void testReset()
    {
        HttpServletResponse response = newResponse();

        response.reset();

        replayControls();

        ServletWebResponse swr = new ServletWebResponse(response);
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

        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

        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, exceptionList);
View Full Code Here

            }
            catch(RuntimeException e)
            {
                request.setAttribute("GzipFilter",Boolean.FALSE);
                if (!response.isCommitted())
                    response.reset();
                throw e;
            }
            finally
            {
                if (exceptional && !response.isCommitted())
View Full Code Here

        // handle dev response
        if (this.developmentMode && !context.getResponseComplete()
                && resp instanceof HttpServletResponse) {
            HttpServletResponse httpResp = (HttpServletResponse) resp;
            if (!httpResp.isCommitted()) {
              httpResp.reset();
              httpResp.setContentType("text/html; charset=UTF-8");
              Writer w = httpResp.getWriter();
              DevTools.debugHtml(w, context, e);
              w.flush();
              context.responseComplete();
View Full Code Here

        assertSame(writer1, swr.getPrintWriter(new ContentType("foo/bar")));

        verifyControls();

        response.reset();
        response.setContentType("zip/zap");
        response.getWriter();
        getControl(response).setReturnValue(writer2);

        replayControls();
View Full Code Here

    public void testReset()
    {
        HttpServletResponse response = newResponse();

        response.reset();

        replayControls();

        ServletWebResponse swr = new ServletWebResponse(response);
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.