users@woodstock.java.net

Error pages do not show in JSF (Woodstock) app ...

From: tonyweb <tonyweb_mail_at_yahoo.it>
Date: Mon, 10 Nov 2008 02:01:24 -0800 (PST)

Hi guys,
you can help me for sure.

I know it's a very popular question but I've never found a working solution
(for my case).
I'm trying to show custom error pages for any kind of errors in my App ...
but <error-page> configuration is ignored completely.

I'm using version 4.2 of woodstock components and NetBeans 6.1

This is my web.xml

---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
    </context-param>

    <!-- Fine - Parametri per upload -->
    
    <context-param>
        <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <description>Il codice della regione</description>
        <param-name>CodiceRegione</param-name>
        <param-value>150</param-value>
    </context-param>

    <context-param>
        <description>La pagina di errore che viene mostrata per un donwload
non possibile</description>
        <param-name>TracDownloadImpossiblePage</param-name>
        <param-value>/errori/ErroreDownload.jsp</param-value>
    </context-param>
    <context-param>
        <param-name>Titolo</param-name>
        <param-value>napoli3</param-value>
    </context-param>
    <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.webui.jsf.util.UploadFilter</filter-class>
        <init-param>
            <description>The maximum allowed upload size in bytes. If this
is set to a negative value, there is no maximum. The default value is
1000000.</description>
            <param-name>maxSize</param-name>
            <param-value>100000000</param-value>
        </init-param>
        <init-param>
            <description>The size (in bytes) of an uploaded file which, if
it is exceeded, will cause the file to be written directly to disk instead
of stored in memory. Files smaller than or equal to this size will be
stored in memory. The default value is 4096.</description>
            <param-name>sizeThreshold</param-name>
            <param-value>4096</param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>LoginCheckFilter</filter-name>
       
<filter-class>com.cid.arsan.web.filter.LoginCheckFilter</filter-class>
        <init-param>
            <description>il nome della variabile in cui vengono memorizzati
i dati dell'utente in sessione</description>
            <param-name>UserSessionVariable</param-name>
            <param-value>SessionBean1</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>LoginCheckFilter</filter-name>
        <url-pattern>/tracciati/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <filter-mapping>
        <filter-name>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>LoginCheckFilter</filter-name>
        <url-pattern>/admin/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
        
    <!-- Servlet -->
    
    <!--
        Servlet per avvio di WatchDog all'avvio dell'applicazione.
        Si noti il valore '3' per load-on-startup che consente alla
        servlet di avviarsi *dopo* la servlet delle Faces.
    -->
    <servlet>
        <servlet-name>InitWatchDogServlet</servlet-name>
       
<servlet-class>com.cid.arsan.web.servlet.InitWatchDogServlet</servlet-class>
        <load-on-startup>3</load-on-startup>
    </servlet>
    
    <!-- Fine - Servlet per avvio di WatchDog all'avvio dell'applicazione
-->
    
    
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <init-param>
            <param-name>javax.faces.LIFECYCLE_ID</param-name>
            <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    
    <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
            <param-name>errorHost</param-name>
            <param-value>localhost</param-value>
        </init-param>
        <init-param>
            <param-name>errorPort</param-name>
            <param-value>24444</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    
    <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>TracBuildServlet</servlet-name>
       
<servlet-class>com.cid.arsan.web.servlet.TracBuildServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>motoreStampe</servlet-name>
        <servlet-class>com.cid.stampeweb.myStampeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>ImageServlet</servlet-name>
       
<servlet-class>net.sf.jasperreports.j2ee.servlets.ImageServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>TracDownloadServlet</servlet-name>
       
<servlet-class>com.cid.arsan.web.servlet.TracDownloadServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>login_servlet</servlet-name>
       
<servlet-class>com.cid.arsan.web.servlet.login_servlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>TracBuildServlet</servlet-name>
        <url-pattern>/TracBuildServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ImageServlet</servlet-name>
        <url-pattern>/imageServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>motoreStampe</servlet-name>
        <url-pattern>*.Stampe</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>TracDownloadServlet</servlet-name>
        <url-pattern>/TracDownloadServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>login_servlet</servlet-name>
        <url-pattern>/login_servlet</url-pattern>
    </servlet-mapping>
    
   <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/errori/ErroreNull.jsp</location>
    </error-page>
    <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
       
<exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    
    <error-page>
        <error-code>500</error-code>
        <location>/error/ExceptionHandler</location>
    </error-page>
    
    <error-page>
        <error-code>404</error-code>
        <location>/error/ExceptionHandler</location>
    </error-page>
    
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>/Avvia.jsp</welcome-file>
    </welcome-file-list>

<!-- Imposta la configurazione per i fragment -->

    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jspf</url-pattern>
            <is-xml>true</is-xml>
        </jsp-property-group>
    </jsp-config>

    <!-- env-entries list -->
               
               :
               :
    <!-- end of env-entries list -->

    </web-app>

---------------------------

As error-location I tried to put both an html, jsp or the exception handler
servlet ... but none of them work :(

Coull you, please, help me ?
I need to use custom error page under jboss 4.2.

Thanks in advance

Regards,
Tony

P.S. Sorry for my bad english ;)
-- 
View this message in context: http://www.nabble.com/Error-pages-do-not-show-in-JSF-%28Woodstock%29-app-...-tp20416882p20416882.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.