Author: ppitonak(a)redhat.com
Date: 2011-11-24 12:56:16 -0500 (Thu, 24 Nov 2011)
New Revision: 23002
Added:
modules/tests/metamer/trunk/application/src/main/webapp/error/
modules/tests/metamer/trunk/application/src/main/webapp/error/404.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/error/500.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml
Log:
error pages for 404 and 500 added to the application
Modified: modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml 2011-11-24
15:54:29 UTC (rev 23001)
+++ modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml 2011-11-24
17:56:16 UTC (rev 23002)
@@ -1,97 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
- <display-name>metamer</display-name>
- <!-- disabled because of a bug in Mojarra 2.1 showing an error message on every page
- <context-param>
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <display-name>metamer</display-name>
+
+ <!-- disabled because of a bug in Mojarra 2.1 showing an error message on every
page
+ <context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
- </context-param>-->
- <context-param>
-
<param-name>com.sun.faces.enableMissingResourceLibraryDetection</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
- <param-value>2097152</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.push.jms.connectionPassword</param-name>
- <param-value>guest</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.push.jms.connectionUsername</param-name>
- <param-value>guest</param-value>
- </context-param>
-
- <!-- resource mapping enable/disable/configure -->
- <context-param>
- <param-name>org.richfaces.resourceMapping.compressedStages</param-name>
- <param-value>None</param-value>
- </context-param>
- <!-- -->
- <context-param>
- <param-name>org.richfaces.resourceMapping.packedStages</param-name>
- <param-value>None</param-value>
- </context-param>
- <!-- -->
- <context-param>
- <param-name>org.richfaces.resourceMapping.enabled</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.skin</param-name>
- <param-value>#{richBean.skin}</param-value>
- </context-param>
- <filter>
- <filter-name>PushFilter</filter-name>
- <filter-class>org.richfaces.webapp.PushFilter</filter-class>
- <async-supported>true</async-supported>
- </filter>
- <filter>
- <filter-name>Test Identity Filter</filter-name>
-
<filter-class>org.richfaces.tests.metamer.TestIdentityFilter</filter-class>
- <async-supported>true</async-supported>
- </filter>
- <filter-mapping>
- <filter-name>PushFilter</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- </filter-mapping>
- <filter-mapping>
- <filter-name>Test Identity Filter</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- </filter-mapping>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <servlet-name>Resource Servlet</servlet-name>
- <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource Servlet</servlet-name>
- <url-pattern>/org.richfaces.resources/*</url-pattern>
- </servlet-mapping>
- <welcome-file-list>
- <welcome-file>faces/index.xhtml</welcome-file>
- </welcome-file-list>
+ </context-param>
+ -->
+ <context-param>
+
<param-name>com.sun.faces.enableMissingResourceLibraryDetection</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
+ <param-value>2097152</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.push.jms.connectionPassword</param-name>
+ <param-value>guest</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.push.jms.connectionUsername</param-name>
+ <param-value>guest</param-value>
+ </context-param>
+ <!-- resource mapping enable/disable/configure -->
+ <context-param>
+
<param-name>org.richfaces.resourceMapping.compressedStages</param-name>
+ <param-value>None</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.resourceMapping.packedStages</param-name>
+ <param-value>None</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.resourceMapping.enabled</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{richBean.skin}</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>PushFilter</filter-name>
+ <filter-class>org.richfaces.webapp.PushFilter</filter-class>
+ <async-supported>true</async-supported>
+ </filter>
+ <filter>
+ <filter-name>Test Identity Filter</filter-name>
+
<filter-class>org.richfaces.tests.metamer.TestIdentityFilter</filter-class>
+ <async-supported>true</async-supported>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>PushFilter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>Test Identity Filter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Resource Servlet</servlet-name>
+ <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource Servlet</servlet-name>
+ <url-pattern>/org.richfaces.resources/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>faces/index.xhtml</welcome-file>
+ </welcome-file-list>
+
+ <error-page>
+ <error-code>500</error-code>
+ <location>/faces/error/500.xhtml</location>
+ </error-page>
+ <error-page>
+ <error-code>404</error-code>
+ <location>/faces/error/404.xhtml</location>
+ </error-page>
+
</web-app>
Added: modules/tests/metamer/trunk/application/src/main/webapp/error/404.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/error/404.xhtml
(rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/error/404.xhtml 2011-11-24
17:56:16 UTC (rev 23002)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<h:head>
+ <title>Error 404</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+</h:head>
+
+<h:body>
+ <h1 style="color: red;">Error 404: Not Found</h1>
+
+ <p>
+ <h:link id="goHomeLink" outcome="/index" value="Back
to the Main Page" />
+ </p>
+
+</h:body>
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/error/500.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/error/500.xhtml
(rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/error/500.xhtml 2011-11-24
17:56:16 UTC (rev 23002)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<h:head>
+ <title>Error 500</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+</h:head>
+
+<h:body>
+ <h1 style="color: red;">Error 500: Internal Server Error</h1>
+
+ <p>
+ <h:link id="goHomeLink" outcome="/index" value="Back
to the Main Page" />
+ </p>
+
+</h:body>
+</html>
\ No newline at end of file