Examples of addErrorPage()


Examples of org.apache.catalina.Context.addErrorPage()

        ctx.addServletMapping("/error", "errorPage");
        // And the handling for 404 responses
        ErrorPage errorPage = new ErrorPage();
        errorPage.setErrorCode(Response.SC_NOT_FOUND);
        errorPage.setLocation("/error");
        ctx.addErrorPage(errorPage);

        // Add the request listener
        Bug51653RequestListener reqListener =
            new Bug51653RequestListener(trace);
        ((StandardContext) ctx).addApplicationEventListener(reqListener);
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

        ctx.addServletMapping("/error", "errorPage");
        // And the handling for 404 responses
        ErrorPage errorPage = new ErrorPage();
        errorPage.setErrorCode(Response.SC_NOT_FOUND);
        errorPage.setLocation("/error");
        ctx.addErrorPage(errorPage);

        // Add the request listener
        Bug51653RequestListener reqListener =
            new Bug51653RequestListener(trace);
        ((StandardContext) ctx).addApplicationEventListener(reqListener);
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

                ep.setLocation("/error/async");
            } else {
                ep.setLocation("/error/nonasync");
            }

            ctx.addErrorPage(ep);
        }

        ctx.addApplicationListener(new ApplicationListener(
                TrackingRequestListener.class.getName(), false));
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

        // And the handling for 500 responses
        ErrorPage errorPage500 = new ErrorPage();
        errorPage500.setErrorCode(Response.SC_INTERNAL_SERVER_ERROR);
        errorPage500.setLocation("/report/500");
        ctx.addErrorPage(errorPage500);

        // And the default error handling
        ErrorPage errorPageDefault = new ErrorPage();
        errorPageDefault.setLocation("/report/default");
        ctx.addErrorPage(errorPageDefault);
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

        ctx.addErrorPage(errorPage500);

        // And the default error handling
        ErrorPage errorPageDefault = new ErrorPage();
        errorPageDefault.setLocation("/report/default");
        ctx.addErrorPage(errorPageDefault);

        tomcat.start();

        doTestErrorPageHandling(500, "/500");
        doTestErrorPageHandling(501, "/default");
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

                ep.setLocation("/error/async");
            } else {
                ep.setLocation("/error/nonasync");
            }

            ctx.addErrorPage(ep);
        }

        ctx.addApplicationListener(TrackingRequestListener.class.getName());

        TesterAccessLogValve alv = new TesterAccessLogValve();
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

                ep.setLocation("/error/async");
            } else {
                ep.setLocation("/error/nonasync");
            }

            ctx.addErrorPage(ep);
        }

        ctx.addApplicationListener(TrackingRequestListener.class.getName());

        TesterAccessLogValve alv = new TesterAccessLogValve();
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

        // PUT requests are normally blocked for JSPs
        ErrorPage ep = new ErrorPage();
        ep.setErrorCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        // Note this location doesn't actually exist
        ep.setLocation("/WEB-INF/jsp/error.jsp");
        context.addErrorPage(ep);

        tomcat.start();

        int rc = methodUrl("http://localhost:" + getPort() + "/test/bug56568",
                new ByteChunk(), 5000, null, null, "PUT");
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

                ep.setLocation("/error/async");
            } else {
                ep.setLocation("/error/nonasync");
            }

            ctx.addErrorPage(ep);
        }

        ctx.addApplicationListener(TrackingRequestListener.class.getName());

        TesterAccessLogValve alv = new TesterAccessLogValve();
View Full Code Here

Examples of org.apache.catalina.Context.addErrorPage()

        ctx.addServletMapping("/error", "errorPage");
        // And the handling for 404 responses
        ErrorPage errorPage = new ErrorPage();
        errorPage.setErrorCode(Response.SC_NOT_FOUND);
        errorPage.setLocation("/error");
        ctx.addErrorPage(errorPage);

        // Add the request listener
        Bug51653RequestListener reqListener =
            new Bug51653RequestListener(trace);
        ((StandardContext) ctx).addApplicationEventListener(reqListener);
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.