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
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();
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
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
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
5 matches
Mail list logo