Does anyone know if there is a way to make a single <error-page> entry in
web.xml cover more than one <error-code>?

I have created a single error page which I would like to display whatever
the <exception-type> or <error-code>.  Catching all the <exception-type>s in
one go is easy - I just use:

        <error-page>
                <exception-type>java.lang.Throwable</exception-type>
                <location>/WEB-INF/jsp/Error.jsp</location>
        </error-page>

However I can't see how to catch multiple <error-code>s.  I'm currently
listing them all separately but directing them all to the same page, but
this seems weak from the standpoint of maintenance and error avoidance:

        <error-page>
                <error-code>401</error-code>
                <location>/WEB-INF/jsp/Error.jsp</location>
        </error-page>

        <error-page>
                <error-code>402</error-code>
                <location>/WEB-INF/jsp/Error.jsp</location>
        </error-page>

        <error-page>
                <error-code>403</error-code>
                <location>/WEB-INF/jsp/Error.jsp</location>
        </error-page>

        etc.

I've searched the web, the docs I can think of, and the books that I have,
to no avail.  Any suggestions much appreciated.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to