Examples of errorPage()


Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      WebResourceFacet web = this.project.getFacet(WebResourceFacet.class);

      // (prefer /faces/error.xhtml)

      String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource("error.xhtml")).get(1);
      servletConfig.errorPage(404, errorLocation);
      servletConfig.errorPage(500, errorLocation);
     
      // Use the server timezone since we accept dates in that timezone, and it makes sense to display them in the same
      if (servletConfig.getContextParam("javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE") == null)
      {
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      // (prefer /faces/error.xhtml)

      String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource("error.xhtml")).get(1);
      servletConfig.errorPage(404, errorLocation);
      servletConfig.errorPage(500, errorLocation);
     
      // Use the server timezone since we accept dates in that timezone, and it makes sense to display them in the same
      if (servletConfig.getContextParam("javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE") == null)
      {
         servletConfig.contextParam("javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE", "true");
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      WebResourceFacet web = this.project.getFacet(WebResourceFacet.class);

      // (prefer /faces/error.xhtml)

      String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource("error.xhtml")).get(1);
      servletConfig.errorPage(404, errorLocation);
      servletConfig.errorPage(500, errorLocation);

      servlet.saveConfig(servletConfig);
   }
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      // (prefer /faces/error.xhtml)

      String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource("error.xhtml")).get(1);
      servletConfig.errorPage(404, errorLocation);
      servletConfig.errorPage(500, errorLocation);

      servlet.saveConfig(servletConfig);
   }

   protected Node removeConflictingErrorPages(final ServletFacet servlet)
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      WebResourceFacet web = this.project.getFacet(WebResourceFacet.class);

      // (prefer /faces/error.xhtml)

      String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource("error.xhtml")).get(1);
      servletConfig.errorPage(404, errorLocation);
      servletConfig.errorPage(500, errorLocation);

      servlet.saveConfig(servletConfig);
   }
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      // (prefer /faces/error.xhtml)

      String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource("error.xhtml")).get(1);
      servletConfig.errorPage(404, errorLocation);
      servletConfig.errorPage(500, errorLocation);

      servlet.saveConfig(servletConfig);
   }

   protected Node removeConflictingErrorPages(final ServletFacet servlet)
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      FileResource<?> descriptor = project.getFacet(ServletFacet.class).getConfigFile();
      WebAppDescriptor unit = Descriptors.create(WebAppDescriptor.class)
               .welcomeFile("/index.html");

      unit.errorPage(404, "/404.html");
      unit.errorPage(500, "/500.html");

      descriptor.setContents(unit.exportAsString());
   }
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

      FileResource<?> descriptor = project.getFacet(ServletFacet.class).getConfigFile();
      WebAppDescriptor unit = Descriptors.create(WebAppDescriptor.class)
               .welcomeFile("/index.html");

      unit.errorPage(404, "/404.html");
      unit.errorPage(500, "/500.html");

      descriptor.setContents(unit.exportAsString());
   }

}
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

            WebAppDescriptor unit = Descriptors.create(WebAppDescriptor.class)
                     .displayName(projectName)
                     .sessionTimeout(30)
                     .welcomeFile("/index.html");

            unit.errorPage(404, "/faces/404.html");
            unit.errorPage(500, "/faces/500.html");

            descriptor.setContents(unit.exportAsString());
         }
View Full Code Here

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor.errorPage()

                     .displayName(projectName)
                     .sessionTimeout(30)
                     .welcomeFile("/index.html");

            unit.errorPage(404, "/faces/404.html");
            unit.errorPage(500, "/faces/500.html");

            descriptor.setContents(unit.exportAsString());
         }

         ((FileResource<?>) webRoot.getChild("404.html")).setContents(getClass().getResourceAsStream(
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.