Package javax.servlet.http

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


      if (!context.getResponseComplete() && !continueToFaces)
      {
         HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
         try
         {
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            context.responseComplete();
         }
         catch (IOException e1)
         {
            throw new PrettyException(e1);
View Full Code Here


   public void send404(final FacesContext facesContext)
   {
      try
      {
         HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
         response.sendError(HttpServletResponse.SC_NOT_FOUND);
      }
      catch (IOException e)
      {
         throw new PrettyException(e);
      }
View Full Code Here

      try
      {
         if (message == null)
         {
            response.sendError(code);
         }
         else
         {
            response.sendError(code, message);
         }
View Full Code Here

         {
            response.sendError(code);
         }
         else
         {
            response.sendError(code, message);
         }

         abort();
      }
      catch (IOException e)
View Full Code Here

    /* ------------------------------------------------------------ */
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException
    {
        HttpServletResponse response = (HttpServletResponse)res;
        response.sendError(503);       
    }
}
View Full Code Here

              UGateWebSocketServlet.class.getSimpleName()) || hasOrigURI(
              req, UGateAjaxUpdaterServlet.class.getSimpleName()))) {
        // other servlet process
        chain.doFilter(req, res);
      } else if (!processed) {
        res.sendError(HttpServletResponse.SC_NOT_FOUND);
      }
    } catch (final Throwable t) {
      throw new ServletException(t);
    }
  }
View Full Code Here

    }

    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException
    {
        HttpServletResponse response = (HttpServletResponse)res;
        response.sendError(503);       
    }
}
View Full Code Here

                        request.getServerPort(),
                        uri);
               
                if (url==null)
                {
                    response.sendError(HttpServletResponse.SC_FORBIDDEN);
                    return;
                }

                HttpExchange exchange = new HttpExchange()
                {
View Full Code Here

    {
        HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
        try
        {
            context.responseComplete();
            response.sendError(HttpServletResponse.SC_NOT_FOUND, message);
        }
        catch (IOException ioe)
        {
            throw new FacesException(ioe);
        }
View Full Code Here

    {
        HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
        try
        {
            context.responseComplete();
            response.sendError(HttpServletResponse.SC_NOT_FOUND, message);
        }
        catch (IOException ioe)
        {
            throw new FacesException(ioe);
        }
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.