I followed the instructions for disabling MyFaces error handling here: http://wiki.apache.org/myfaces/Handling_Server_Errors

I implemented the method of using a simple JSP page. I tested the solution and it worked fine for all my test cases. I forced a simple exception, and I left the page timeout so as to see a ViewExpiredException. In both cases, my error.jsp was invoked.

However, this past Friday while testing something completely unrelated, the MyFaces error page popped up with:

javax.crypto.BadPaddingException - Given final block not properly padded

My app runs under SSL (https). Any ideas why my error page was not invoked and instead the standard MyFaces error page was displayed?

Here are the changes I made to web.xml.  We are using facelets.  Thanks.

        <context-param>
        <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
        <param-value>false</param-value>
        </context-param>

        <!-- if you are using myfaces + facelets don't forget to do this -->

        <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>false</param-value>
        </context-param>

        <error-page>
<exception-type>javax.faces.el.EvaluationException</exception-type>
                <location>/error.jsp</location>
        </error-page>
        <error-page>
                <exception-type>java.lang.Exception</exception-type>
                <location>/error.jsp</location>
        </error-page>
        <error-page>
                <exception-type>java.lang.RuntimeException</exception-type>
                <location>/error.jsp</location>
        </error-page>
        <error-page>
                <exception-type>javax.servlet.ServletException</exception-type>
                <location>/error.jsp</location>
        </error-page>
        <error-page>
                <error-code>500</error-code>
                <location>/error.jsp</location>
        </error-page>


--
Guy Rouillier

Reply via email to