You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ivan Siviero <iv...@concept.it> on 2002/02/19 11:26:21 UTC

exception in action

hi everyone.

I have an errorpage to which all the exceptions are forwarded.
This errorpage emails me the exception details and display a user friendly
message instead of the complete exception details.
Everything works fine when the exception occurs in some custom tag, i get
the exception by pageContext.getException().
Now let's suppose the exception occurs in some Action.
The pageContext.getException() in the errorpage returns null.
So i do not know both the exception detail and the action who raised it.
How can i get this information?
Bye
IVan.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: exception in action

Posted by Ted Husted <hu...@apache.org>.
The Struts tags should be passing the original exception in the request
under the key Action.EXCEPTION_KEY so you can retrieve it from there on
your error page. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Ivan Siviero wrote:
> 
> hi everyone.
> 
> I have an errorpage to which all the exceptions are forwarded.
> This errorpage emails me the exception details and display a user friendly
> message instead of the complete exception details.
> Everything works fine when the exception occurs in some custom tag, i get
> the exception by pageContext.getException().
> Now let's suppose the exception occurs in some Action.
> The pageContext.getException() in the errorpage returns null.
> So i do not know both the exception detail and the action who raised it.
> How can i get this information?
> Bye
> IVan.
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>