Examples of ErrorPage


Examples of com.dodo.blog.ui.page.ErrorPage

        e.printStackTrace( new PrintWriter( sw ) );
        log.severe( sw.toString() );

        try
        {
            ErrorPage errorPage = RequestCycle.get().getWebApplication().getErrorPage().newInstance();
            errorPage.setError( e );

            httpResponse.getWriter().write( errorPage.render() );
            httpResponse.setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR );
        }
        catch ( Exception e1 )
        {
            log.severe( "Error occurred during creating error page:" + e1 );
View Full Code Here

Examples of com.google.gwt.dev.codeserver.Pages.ErrorPage

      throw new RuntimeException("invalid request (shouldn't happen): " + target);
    }

    Outbox box = outboxes.findByOutputModuleName(moduleName);
    if (box == null) {
      return new ErrorPage("No such module: " + moduleName);
    } else if (box.containsStubCompile()) {
      return new ErrorPage("This module hasn't been compiled yet.");
    }

    String rootDir = SOURCEMAP_PATH + moduleName + "/";
    String rest = target.substring(rootDir.length());

    if (rest.isEmpty()) {
      return makeDirectoryListPage(box);
    } else if (rest.equals("gwtSourceMap.json")) {
      // This URL is no longer used by debuggers (we use the strong name) but is used for testing.
      // It's useful not to need the strong name to download the sourcemap.
      // (But this only works when there is one permutation.)
      return makeSourceMapPage(moduleName, box.findSourceMapForOnePermutation(), request);
    } else if (rest.endsWith("/")) {
      return sendFileListPage(box, rest);
    } else if (rest.endsWith(".java")) {
      return makeSourcePage(box, rest, request.getQueryString(), logger);
    } else {
      String strongName = getStrongNameFromSourcemapFilename(rest);
      if (strongName != null) {
        File sourceMap = box.findSourceMap(strongName).getAbsoluteFile();
        return makeSourceMapPage(moduleName, sourceMap, request);
      } else {
        return new ErrorPage("page not found");
      }
    }
  }
View Full Code Here

Examples of io.undertow.servlet.api.ErrorPage

                d.addWelcomePages("index.html", "index.htm", "index.jsp");
            }

            if (mergedMetaData.getErrorPages() != null) {
                for (final ErrorPageMetaData page : mergedMetaData.getErrorPages()) {
                    final ErrorPage errorPage;
                    if (page.getExceptionType() != null && !page.getExceptionType().isEmpty()) {
                        errorPage = new ErrorPage(page.getLocation(), (Class<? extends Throwable>) module.getClassLoader().loadClass(page.getExceptionType()));
                    } else if (page.getErrorCode() != null && !page.getErrorCode().isEmpty()) {
                        errorPage = new ErrorPage(page.getLocation(), Integer.parseInt(page.getErrorCode()));
                    } else {
                        errorPage = new ErrorPage(page.getLocation());
                    }
                    d.addErrorPages(errorPage);
                }
            }
View Full Code Here

Examples of net.vidageek.crawler.page.ErrorPage

          Charset utf8Charset = Charset.forName("UTF-8");
          String utf8Content = new String(utf8Charset.encode(buffer).array(), "UTF-8");

          return new OkPage(url, utf8Content);
        }
        return new ErrorPage(url, status);
      } finally {
        method.abort();
      }

    } catch (IOException e) {
View Full Code Here

Examples of org.apache.catalina.deploy.ErrorPage

        Wrapper w3 = Tomcat.addServlet(ctx, "asyncErrorPage", asyncErrorPage);
        w3.setAsyncSupported(true);
        ctx.addServletMapping("/error/async", "asyncErrorPage");

        if (asyncError != null) {
            ErrorPage ep = new ErrorPage();
            ep.setErrorCode(500);
            if (asyncError.booleanValue()) {
                ep.setLocation("/error/async");
            } else {
                ep.setLocation("/error/nonasync");
            }

            ctx.addErrorPage(ep);
        }
View Full Code Here

Examples of org.apache.catalina.deploy.ErrorPage

     */
    public ErrorPage[] findErrorPages() {

        synchronized(exceptionPages) {
            synchronized(statusPages) {
                ErrorPage results1[] = new ErrorPage[exceptionPages.size()];
                results1 =
                    (ErrorPage[]) exceptionPages.values().toArray(results1);
                ErrorPage results2[] = new ErrorPage[statusPages.size()];
                results2 =
                    (ErrorPage[]) statusPages.values().toArray(results2);
                ErrorPage results[] =
                    new ErrorPage[results1.length + results2.length];
                for (int i = 0; i < results1.length; i++)
                    results[i] = results1[i];
                for (int i = results1.length; i < results.length; i++)
                    results[i] = results2[i - results1.length];
View Full Code Here

Examples of org.apache.catalina.deploy.ErrorPage

     */
    public ErrorPage[] findErrorPages() {

        synchronized(exceptionPages) {
            synchronized(statusPages) {
                ErrorPage results1[] = new ErrorPage[exceptionPages.size()];
                results1 =
                    (ErrorPage[]) exceptionPages.values().toArray(results1);
                ErrorPage results2[] = new ErrorPage[statusPages.size()];
                results2 =
                    (ErrorPage[]) statusPages.values().toArray(results2);
                ErrorPage results[] =
                    new ErrorPage[results1.length + results2.length];
                for (int i = 0; i < results1.length; i++)
                    results[i] = results1[i];
                for (int i = results1.length; i < results.length; i++)
                    results[i] = results2[i - results1.length];
View Full Code Here

Examples of org.apache.catalina.deploy.ErrorPage

     */
    public ErrorPage[] findErrorPages() {

        synchronized(exceptionPages) {
            synchronized(statusPages) {
                ErrorPage results1[] = new ErrorPage[exceptionPages.size()];
                results1 =
                    (ErrorPage[]) exceptionPages.values().toArray(results1);
                ErrorPage results2[] = new ErrorPage[statusPages.size()];
                results2 =
                    (ErrorPage[]) statusPages.values().toArray(results2);
                ErrorPage results[] =
                    new ErrorPage[results1.length + results2.length];
                for (int i = 0; i < results1.length; i++)
                    results[i] = results1[i];
                for (int i = results1.length; i < results.length; i++)
                    results[i] = results2[i - results1.length];
View Full Code Here

Examples of org.apache.catalina.deploy.ErrorPage

     */
    public ErrorPage[] findErrorPages() {

        synchronized(exceptionPages) {
            synchronized(statusPages) {
                ErrorPage results1[] = new ErrorPage[exceptionPages.size()];
                results1 =
                    (ErrorPage[]) exceptionPages.values().toArray(results1);
                ErrorPage results2[] = new ErrorPage[statusPages.size()];
                results2 =
                    (ErrorPage[]) statusPages.values().toArray(results2);
                ErrorPage results[] =
                    new ErrorPage[results1.length + results2.length];
                for (int i = 0; i < results1.length; i++)
                    results[i] = results1[i];
                for (int i = results1.length; i < results.length; i++)
                    results[i] = results2[i - results1.length];
View Full Code Here

Examples of org.apache.catalina.deploy.ErrorPage

     *
     * @param status HTTP status code to look up
     */
    public String findStatusPage(int status) {

        ErrorPage errorPage = (ErrorPage)statusPages.get(new Integer(status));
        if (errorPage!=null) {
            return errorPage.getLocation();
        }
        return null;

    }
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.