Hi all,
I'm in the process of implementing a declarative exception handler for my
Struts web app. The code passes the exception to the handler properly and finds exception.jsp properly, but I can't get my messages to appear on exception.jsp. Here is what my configuration looks like:
<global-exceptions>
<exception
type="java.lang.Throwable"
key="exception.details"
handler="pkg.exceptions.ExceptionHandler"
path="/exception.jsp"/>
</global-exceptions>
I have a key in my MessageResources.properties file called 'exception.details' and it's value is set to {0} or just whatever message is passed in. In my exception handler, I'm calling storeException() as such:
storeException(request, "exception.details", new ActionMessage(ex.getMessage()), new ActionForward(ae.getPath()), ae.getScope());
I can see the exception message being stored in the request attributes just after the storeException() method call, so I know it's there.
I've tried numerous things to get the message to display on exception.jsp, but nothing works.
Any ideas? Thanks.
[ March 01, 2007: Message edited by: Bryan Comstock ]