Path definitions for struts global exceptions handler

In struts you can define a global exception handler which is used as a catch all so you can display some meaningful page to the users. The path definition must be a path to a page and not a struts action or tiles definition path.

When you think about this it makes sense otherwise you could get into an infinite loop. By defining a path to a page you are taking control away from struts and tiles, so if there is an error displaying the error page, the global exception handler isn’t invoked.


<global-exceptions>
<exception type="java.lang.Throwable" key="error.exception" handler="my.package.ExceptionHandler" path="my_nice_error_page.html" />
</global-exceptions>