Package org.eclipse.jetty.servlet

Examples of org.eclipse.jetty.servlet.ErrorPageErrorHandler


     * @param contextPath The context path
     * @param webApp The URL or filename of the webapp directory or war file.
     */
    public WebAppContext(HandlerContainer parent, String webApp, String contextPath)
    {
        this(parent,contextPath,null,null,null,new ErrorPageErrorHandler(),SESSIONS|SECURITY);
        setWar(webApp);
    }
View Full Code Here


     */
    public WebAppContext(HandlerContainer parent, String contextPath, SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler,int options)
    {
        super(parent, contextPath,sessionHandler, securityHandler, servletHandler, errorHandler,options);
        _scontext = new Context();
        setErrorHandler(errorHandler != null ? errorHandler : new ErrorPageErrorHandler());
        setProtectedTargets(__dftProtectedTargets);
    }
View Full Code Here

  }

  private void addJettyErrorPages(ErrorHandler errorHandler,
      Collection<ErrorPage> errorPages) {
    if (errorHandler instanceof ErrorPageErrorHandler) {
      ErrorPageErrorHandler handler = (ErrorPageErrorHandler) errorHandler;
      for (ErrorPage errorPage : errorPages) {
        if (errorPage.isGlobal()) {
          handler.addErrorPage(ErrorPageErrorHandler.GLOBAL_ERROR_PAGE,
              errorPage.getPath());
        }
        else {
          if (errorPage.getExceptionName() != null) {
            handler.addErrorPage(errorPage.getExceptionName(),
                errorPage.getPath());
          }
          else {
            handler.addErrorPage(errorPage.getStatusCode(),
                errorPage.getPath());
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.servlet.ErrorPageErrorHandler

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.