Package org.mortbay.jetty.handler

Examples of org.mortbay.jetty.handler.ErrorHandler


            code!=SC_PARTIAL_CONTENT &&
            code>=SC_OK)
        {
            Request request = _connection.getRequest();

            ErrorHandler error_handler = null;
            ContextHandler.SContext context = request.getContext();
            if (context!=null)
                error_handler=context.getContextHandler().getErrorHandler();
            if (error_handler!=null)
            {
                // TODO - probably should reset these after the request?
                request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
                request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
                request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
                request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
               
                error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
            }
            else
            {
                setHeader(HttpHeaders.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
                setContentType(MimeTypes.TEXT_HTML_8859_1);
View Full Code Here


            code!=SC_PARTIAL_CONTENT &&
            code>=SC_OK)
        {
            Request request = _connection.getRequest();

            ErrorHandler error_handler = null;
            ContextHandler.SContext context = request.getContext();
            if (context!=null)
                error_handler=context.getContextHandler().getErrorHandler();
            if (error_handler!=null)
            {
                // TODO - probably should reset these after the request?
                request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
                request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
                request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
                request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
               
                error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
            }
            else
            {
                setContentType(MimeTypes.TEXT_HTML_8859_1);
                ByteArrayISO8859Writer writer= new ByteArrayISO8859Writer(2048);
View Full Code Here

            code!=SC_PARTIAL_CONTENT &&
            code>=SC_OK)
        {
            Request request = _connection.getRequest();

            ErrorHandler error_handler = null;
            ContextHandler.SContext context = request.getContext();
            if (context!=null)
                error_handler=context.getContextHandler().getErrorHandler();
            if (error_handler!=null)
            {
                // TODO - probably should reset these after the request?
                request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
                request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
                request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
                request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
               
                error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
            }
            else
            {
                setHeader(HttpHeaders.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
                setContentType(MimeTypes.TEXT_HTML_8859_1);
View Full Code Here

            code!=SC_PARTIAL_CONTENT &&
            code>=SC_OK)
        {
            Request request = _connection.getRequest();

            ErrorHandler error_handler = null;
            ContextHandler.SContext context = request.getContext();
            if (context!=null)
                error_handler=context.getContextHandler().getErrorHandler();
            if (error_handler!=null)
            {
                // TODO - probably should reset these after the request?
                request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
                request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
                request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
                request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
               
                error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
            }
            else
            {
                setHeader(HttpHeaders.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
                setContentType(MimeTypes.TEXT_HTML_8859_1);
View Full Code Here

            code!=SC_PARTIAL_CONTENT &&
            code>=SC_OK)
        {
            Request request = _connection.getRequest();

            ErrorHandler error_handler = null;
            ContextHandler.SContext context = request.getContext();
            if (context!=null)
                error_handler=context.getContextHandler().getErrorHandler();
            if (error_handler!=null)
            {
                // TODO - probably should reset these after the request?
                request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
                request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
                request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
                request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
               
                error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
            }
            else
            {
                setHeader(HttpHeaders.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
                setContentType(MimeTypes.TEXT_HTML_8859_1);
View Full Code Here

            code!=SC_PARTIAL_CONTENT &&
            code>=SC_OK)
        {
            Request request = _connection.getRequest();

            ErrorHandler error_handler = null;
            ContextHandler.SContext context = request.getContext();
            if (context!=null)
                error_handler=context.getContextHandler().getErrorHandler();
            if (error_handler!=null)
            {
                // TODO - probably should reset these after the request?
                request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
                request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
                request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
                request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
               
                error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
            }
            else
            {
                setHeader(HttpHeaders.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
                setContentType(MimeTypes.TEXT_HTML_8859_1);
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.handler.ErrorHandler

Copyright © 2018 www.massapicom. 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.