struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <>
Subject Re: Exception Page
Date Thu, 17 Oct 2002 18:13:25 GMT
At 10:56 AM -0600 2002/10/17, Dennis Muhlestein wrote:
>I like the global exception handler in struts 1.1b2.
>I have a question I haven't found in the docs.  (Maybe I haven't looked
>hard enough if someone can point the way).
>If Struts forwards to the global exception page, is there a request or
>other attribute that contains a throwable object?  Like if you use the
>jsp error page directive, you get an object called exception. 
>I'd rather just log the exception there, than catch it in the action,log
>it, then throw it again.

In short, the answer is yes.  The default ExceptionHandler stores the 
exception as a request attribute under the key 
org.apache.struts.action.Action.EXCEPTION_KEY (a String constant 
defined as "org.apache.struts.action.EXCEPTION")

This is part of the default behavior in 
org.apache.struts.action.ExceptionHandler; you can subclass this and 
specify your subclass as the handler for certain types of exceptions 
in struts-config.


* Joe Germuska    { }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble.... As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
	--Sam Goody, 1956

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message