Package javax.servlet.http

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


                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


    Throwable rootExn = e;
    Throwable errorPageExn = null;
    LineMap lineMap = null;

    try {
      response.reset();
    } catch (IllegalStateException e1) {
    }

    if (req.isAsyncStarted()) {
      AsyncContext async = req.getAsyncContext();
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

        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

                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

          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

                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

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

        verifyControls();

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

        replayControls();
View Full Code Here

    public void testReset()
    {
        MockControl control = newControl(HttpServletResponse.class);
        HttpServletResponse response = (HttpServletResponse) control.getMock();

        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

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.