Issue: Tomcat does not redirect to the HMAExceptionHandlerServlet servlet I 
have configured in the application specific web.xml when running on Linux


I've tried searching all of the lists for an answer to this question.  I've 
seen several postings by people having the same issue, but never a solution.

My Tomcat version:

Apache Tomcat 5.5.33 (I've also tried 5.5.27 and 6.0.32)

running on:


Fedora 2.6.27.5-117.fc10.x86_64

Two things I would like to note:

1.  When I invoke the Java HMAExceptionHandlerServlet configured to be used in 
the error-page block in the application specific web.xml directly from the URL 
in the browser, it works.

2.  Tomcat 5.5.33 does correctly redirect to the error-page when running on a 
Windows 7 machine.  The only time I have an issue is on the Linux configuration 
above.

My application specific web.xml (located in <tomcat 
install>/webapps/<application>/WEB-INF folder) :

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        
<param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</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>
    <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.rave.web.ui.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>1000000</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-mapping>
        <filter-name>UploadFilter</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>ThemeServlet</servlet-name>
        <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>HMAExceptionHandlerServlet</servlet-name>
        <servlet-class>hmaapp.common.HMAExceptionHandlerServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>HMAExceptionHandlerServlet</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>InterqualJSServlet</servlet-name>
        <url-pattern>/InterqualJSServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>HMAExceptionHandlerServlet</servlet-name>
        <url-pattern>/HMAExceptionHandlerServlet</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>faces/SignOn.jsp</welcome-file>
    </welcome-file-list>
    <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</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>
        <exception-type>java.lang.NullPointerException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jspf</url-pattern>
            <is-xml>true</is-xml>
        </jsp-property-group>
    </jsp-config>
</web-app>

Reply via email to