Re: Global-exception handler

2008-10-10 Thread stanlick
How about this instead -- Is the ActionContext exposed to a JSP other than using the static getContext() method? stanlick wrote: > > I have a global exception handler registered, which is itself an action > mapping. I am trying to ascertain what happened by accessing > ActionContext.getContext

Re: global exception handler sometimes gets a null exception

2006-02-02 Thread Michael Davis
Thanks for your prompt replies! I will try supplying my own exception handler. Looking at the struts source code for the exception handler, I see: // Figure out the error if (ex instanceof ModuleException) { error = ((ModuleException) ex).getActionMessage();

Re: global exception handler sometimes gets a null exception

2006-02-02 Thread Mark Shifman
What I do is log the exception and the stack trace and then let the super do the rest. Since I was getting null comming up on the error page, I check the exception message and if it is null I at least show the name of the exception class name on the error page (probably not too pretty but..) T

Re: global exception handler sometimes gets a null exception

2006-02-02 Thread Frank W. Zammetti
With the caveat that I looked at things for all of 30 seconds so I could be WAY wrong... Looking at the Struts source, the RequestProcessor.processException() method is where your custom handler gets called from. I notice that the request attribute is NOT set there. In fact, there is no referenc

Re: global exception handler sometimes gets a null exception

2006-02-02 Thread Vladislav Pernin
Maybe it happens when the error is not thrown by Struts, so try to use the JSP directive <%@ page isErrorPage="true" %> which give you access to the implicit variable exception. You can also use a exception handler : package com.ddd; public class GlobalExceptionHandler extends ExceptionHand