users@glassfish.java.net

Re: web.xml <error-page> <exception-type> - has anyone made it work?

From: Amy Roh <amy.roh_at_oracle.com>
Date: Wed, 05 May 2010 15:27:03 -0700

The <error-page> <exception-type> functionality in web.xml does work.
In fact, glassfish has a unit test [1].

  <error-page>
    <exception-type>java.sql.SQLException</exception-type>
    <location>/errorSQLException.jsp</location>
  </error-page>

[1]
https://glassfish-svn.dev.java.net/source/browse/glassfish-svn/trunk/v2/appserv-tests/devtests/web/errorPageExceptionTypeMapping

Which error page does it get displayed for you if not the specified
error page?

Amy

glassfish_at_javadesktop.org wrote:
> No matter what I try I can't get it to work, I throw a MyException but it will not move to the specified error page. I've tried every combination of the path to the error
> page, no matter it doesn't work.
>
> Every related forum is filled with people having the same problem, so my question
> is does this functionality actually work? or was it documented just to waste
> people's time? If there's no reply we will simply have to assume that it was just
> to waste time.
>
> <error-page>
> <exception-type>myco.exceptions.MyException</exception-type>
> <location>/faces/errorPage.xhtml</location>
> </error-page>
> [Message sent by forum member 'healeyb']
>
> http://forums.java.net/jive/thread.jspa?messageID=447132
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>